Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line Chart label count not calculating properly #1244

Closed
rameswarprasad opened this issue Jul 13, 2016 · 3 comments
Closed

Line Chart label count not calculating properly #1244

rameswarprasad opened this issue Jul 13, 2016 · 3 comments

Comments

@rameswarprasad
Copy link

multiLineChartView.leftAxis.axisMinValue = 0
multiLineChartView.leftAxis.axisMaxValue = 100
multiLineChartView.leftAxis.labelCount = 4

If label count set to either 3 or 4, both shows the same result i.e
chart issue

Which is correct for label count 3. However it should show the range [25, 50, 75 and 100], if the label count is 4 I believe. Correct me if I'm wrong.

Label count 5 with the above min and max values provides the range[20, 40, 60, 80 and 100].

@liuxuan30
Copy link
Member

liuxuan30 commented Jul 14, 2016

have you turned on yAxis.forceLabelsEnabled? By default, there is a small algorithm to calculate y values so you see the nice values like 30, 60, 90. However, if you need the label count to be fixed, it won't calculate that way, just simple divide

@rameswarprasad
Copy link
Author

Thanks. It worked by forcing the label count and then changing the label count to 5.

I have one more question, though it is different just adding here the link. The feature asked in the link, is it possible or else can it be taken as an idea.

Thanks again for the help.

@liuxuan30
Copy link
Member

hiding the first circle seems not freq. asked, so currently the quick way is to override the loop ignoring i = 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants