Use setAxisMinimum and setAxisMaximum , it will work setAxisMaximum fine!
After creating an instance of BarData you just need to
chart.getXAxis().setAxisMinimum(-data.getBarWidth() / 2); chart.getXAxis().setAxisMaximum(count-data.getBarWidth() / 2);`
There is no need for setFitBars , but the value is count BARENTRY .
garrett
source share