I\'ve created a BarChart using MPAndroidChart and I\'m entering the data dynamically. This means that I need my Y axis to also be determined dynamically. All of my data is repre
To add to the solution, if someone just wants to remove the decimal and repeated values, you can do this :
IAxisValueFormatter yAxisValueFormatter = new IAxisValueFormatter() {
@Override
public String getFormattedValue(float v, AxisBase axisBase) {
//check for decimal value
if (v - (int) v != 0) {
return "";
} else {
return String.valueOf((int) v);
}
}
};
leftAxis.setValueFormatter(yAxisValueFormatter);
rightAxis.setValueFormatter(yAxisValueFormatter);