Akash Patil
Akash Patil

Reputation: 476

Android MP Chart, Bar Chart Y Axis display from 0.0f

I have following bar chart. I wish to display data from 0.0f - 10.9 in Y Axis. I tried using setLabelCount but it doesnt help. t

enter image description here

enter image description here

Upvotes: 2

Views: 2790

Answers (1)

Muhammad Saad Rafique
Muhammad Saad Rafique

Reputation: 3189

there is option of setting maximum and minimum values:

barChart.getAxisRight().setAxisMinValue(3f);
barChart.getAxisRight().setAxisMaxValue(10f);

also:

dataset.setAxisDependency(YAxis.AxisDependency.RIGHT);

because by default graph is dependent on left axis you changed labels range for right axis above and this line will make graph axis dependency w.r.t right axis.

Upvotes: 1

Related Questions