From the documentation here and here , I think that you have two ways to do what you want.
Limit the y axis to your value. (User will not be able to scroll below this point)
yourChart.getAxisLeft().setAxisMinValue(yourValue);
Modify ViewPort to suit your needs:
yourChart.moveViewToY(valueCenterOfScreen, YAxis.AxisDependency.LEFT)
To remove the "0" from the Y axis, you must use a custom YAxisValueFormatter:
public class MyYAxisValueFormatter implements YAxisValueFormatter {
private DecimalFormat mFormat;
public MyYAxisValueFormatter () {
mFormat = new DecimalFormat("###,###,##0.0");
}
@Override
public String getFormattedValue(float value, YAxis yAxis) {
if (value != 0)
return mFormat.format(value);
else
return "";
}
}
00seb source
share