Josh Meng
Josh Meng

Reputation: 53

How to set minimum and maximum of the x axis using iOS-Charts

I'm trying to use ios-charts to draw charts and I have figured out how to set the minimum and maximum of the y axis. However, I have spent more than 5 hours and I still cannot set the minimum and maximum for the x axis. So can anyone help me?

The code I used to limit the y axis is like this

statsView.leftAxis.customAxisMax = 21.00
statsView.leftAxis.customAxisMin = 0.00

and there are just too more points on the screen too many data

Upvotes: 3

Views: 2949

Answers (1)

fullstackduck
fullstackduck

Reputation: 1949

I just tried below code, works for me.

lineChartView.xAxis.axisMinValue = 100;
lineChartView.xAxis.axisMaxValue = 200;

Upvotes: 4

Related Questions