Reputation: 6275
I want insert space left and right to prevent value label prevent yAxis value. And remove background line under charts. How can I do?
Edit
self.lineChart.delegate = self;
self.lineChart.descriptionText = @"";
self.lineChart.drawGridBackgroundEnabled = NO;
self.lineChart.scaleXEnabled = NO;
self.lineChart.scaleYEnabled = NO;
self.lineChart.leftAxis.spaceTop = 0.30f;
Upvotes: 1
Views: 3064
Reputation: 71
On Charts 3.0 you can use...
lineChartView.xAxis.spaceMin = 0.2
lineChartView.xAxis.spaceMax = 0.2
...to add some space on left and right.
Upvotes: 2
Reputation: 3495
To add spacing - you can use Charts 3.0, and adjust xAxis.axisMinimum
/xAxis.axisMaximum
.
To adjust the background, simply use the UIView
's properties of backgroundColor
, opaque
etc.
To disable the grid - adjust the drawGridLinesEnabled
on the axes, as @ashmi123 said.
Upvotes: 0
Reputation: 710
To remove the background line under the charts use below code :
_lineChart.yAxis.drawGridLinesEnabled = NO;
_lineChart.xAxis.drawGridLinesEnabled = NO;
Upvotes: 0