Reputation: 134
Id like to achive someting like this where more negative values appear below less negative. Is it possible for bars to start in other place than 0. chart.getAxisLeft().setInverted(true); does not do what i want.
Upvotes: 1
Views: 148
Reputation: 20278
You can control the span of Y axis by two functions from AxisBase
:
public void setAxisMinimum(float min)
public void setAxisMaximum(float max)
Just iterate through values, choose minimum and maximum values and set Y axis min and max values:
In the case of provided example:
mChart.getAxisLeft().setAxisMinimum(-112f);
mChart.getAxisLeft().setAxisMaximum(-12f);
Upvotes: 1