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

LineChartView Y-Aixs label'number inaccuracy #3794

Closed
LCDelegate opened this issue Dec 21, 2018 · 3 comments
Closed

LineChartView Y-Aixs label'number inaccuracy #3794

LCDelegate opened this issue Dec 21, 2018 · 3 comments

Comments

@LCDelegate
Copy link

LCDelegate commented Dec 21, 2018

self.LineChartView.rightAxis.enabled = NO; ChartYAxis *leftAxis = self.LineChartView.leftAxis; leftAxis.forceLabelsEnabled = NO; leftAxis.axisMinimum = 0;

if "val" about 25000000~30000000,and run next code:
[values addObject:[[ChartDataEntry alloc] initWithX:i y:val]]; leftY-Axis inaccuracy。
img_7452

please help

@liuxuan30
Copy link
Member

don't understand. reopen with more details

@LCDelegate
Copy link
Author

LCDelegate commented Dec 24, 2018

I found this problem,if "val" about 25000000~30000000,and run next code:
[values addObject:[[ChartDataEntry alloc] initWithX:i y:val]]; leftY-Axis inaccuracy。
I think y_axis label order is 1000,0000 、2000,0000 、3000,0000 、4000,0000。
but the result is wrong order 999,9999 、1999,9998 、2999,9997 、3999,9996。

I don’t clear why cause the result.

@liuxuan30
Copy link
Member

liuxuan30 commented Dec 25, 2018

it's just a matter of the nature of double. If you want to format, just use valueFormatter

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