答案 0 :(得分:2)
To start x - axis from 1st position add this code
xAxis.setAxisMinimum(mLineData.getXMin() - 0.5f);
xAxis.setAxisMaximum(mLineData.getXMax() + 0.5f);
答案 1 :(得分:0)
尝试以下
/**
* Set an extra offset to be appended to the viewport's right
*/
setExtraRightOffset(25f);
/**
* Set an extra offset to be appended to the viewport's left
*/
setExtraLeftOffset(25f);
答案 2 :(得分:0)
@hengstar。 我遇到了和你一样的问题。以下代码适用于我。我希望它会对你有所帮助。
xAxis.setSpaceMax(0.5f);
xAxis.setSpaceMin(0.5f);