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

How to set the scaling for the left/right axis. #924

Closed
tommanuel opened this issue Apr 7, 2016 · 2 comments
Closed

How to set the scaling for the left/right axis. #924

tommanuel opened this issue Apr 7, 2016 · 2 comments

Comments

@tommanuel
Copy link

Suppose in my case I have values ranging from 0-100 in my left axis.My left axis is using a scale of 1 unit = 40.But instead I would like to use a scale of 1 unit = 20,so that it shows the values 0,20,40,60,...... and not 0,40,80..

Anyone??

@tommanuel tommanuel changed the title Hey,great chart you got there.Really helpful in my case. How to set the scaling for the left/right axis. Apr 7, 2016
@liuxuan30
Copy link
Member

Writing a custom value formatter should solve your question, since it's just a matter of formatting. you just x2 or /2 before you format.

@tommanuel
Copy link
Author

hey I resolved the issue.Thanks for your help though.
I resolved it by setting the customAxisMax and customAxisMin and then setting the labelCount.

barChartView.leftAxis.customAxisMax = 100
barChartView.leftAxis.customAxisMin = -100
barChartView.leftAxis.labelCount = 11

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