Dominic Orga February 2016

MPAndroidChart: Remove start padding of x-axis labels in BarChart

enter image description here

As shown in the image above, is there any way to remove the start padding in my x-axis labels? I've tried each of the following codes individually and altogether but they don't seem to do anything:

mBarChart.getXAxis().setXOffset(-50f);
mBarChart.setExtraLeftOffset(-50f);
mBarChart.setPadding(-50, 0,0,0);

Answers


Amit Vaghela February 2016

Call:

chart.setViewPortOffsets(0f, 0f, 0f, 0f);

Check this setting chart padding / offset answer.

Post Status

Asked in February 2016
Viewed 3,203 times
Voted 12
Answered 1 times

Search




Leave an answer