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 minimum displayed Y axis value #2728

Closed
RyanHop3 opened this issue Aug 17, 2017 · 1 comment
Closed

How to set minimum displayed Y axis value #2728

RyanHop3 opened this issue Aug 17, 2017 · 1 comment

Comments

@RyanHop3
Copy link

I am currently using this pod within my app and everything works great but I can't seem to set a minimum displayed y axis value e.g. the y axis shows a value of 100 regardless of the values within the graph. Instead currently I have a y axis that goes up to 1 if I have no data sets and then scales with the maximum value inside the bars.

Example in the two attached images:
Image 1 shows the y axis values when there is no data plotted. As you can see the maximum y axis value is 0.9 and minimum is -0.9. I want to be able to set this to 100 and 0 if that is possible.

Image 2 shows how the y axis values scale with the data. It is now 0 - 50 when the highest data value within the graph is 49.
example 1
example 2

@seenoevo
Copy link

you should be able to by using:

barChartView.leftAxis.axisMinimum = 0.0
barChartView.leftAxis.axisMaximum = 100.0

look at the demo for bar chart and play around with the set values there and you can learn more about how different things are displayed

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

3 participants