I need to change increment value for Y axis.
I'm using this code to set min and max:
YAxis rightYAxis = chart.getAxisRight();
rightYAxis.setAxisMaxValue(180);
rightYAxis.setAxisMinValue(0);
It gives me this view of the right Y axis:
Y axis shows [0, 30, 60, ..., 180] so increment here is 30. But I need to set increment equal 10. So I want to see [0, 10, 20, ..., 180].
I thought that mChart.setVisibleYRange(10, YAxis.AxisDependency.RIGHT);
will help me, but it didn't. The same for rightYAxis.mAxisRange = 10;
.
Is it possible to set it up? It would be very useful.
Try
yAxis.setLabelCount(19)
This should give you labels from 0 to 180 in steps of 10, assuming you set min to 0 and max to 180.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With