简体   繁体   中英

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

在此输入图像描述

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);

Call:

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

Check this setting chart padding / offset answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM