Android MPChart条形图:在零值上绘制x轴线

Android MPChart条形图:在零值上绘制x轴线,android,charts,bar-chart,mpandroidchart,Android,Charts,Bar Chart,Mpandroidchart,我正在使用MPChart显示条形图。我的价值观是积极的和消极的。我想以传统的方式展示xAxis在数学中的应用。使用此代码,我的图表显示垂直线(只需要零) 请提供一些删除所有水平线(零除外)的示例 编辑: 即使在yAxis.setLabelCount(1)(1,因为需要显示零值)时,impl看起来像: public void setLabelCount(int yCount) { if(yCount > 25) { yCount = 25; } if

我正在使用MPChart显示条形图。我的价值观是积极的和消极的。我想以传统的方式展示xAxis在数学中的应用。使用此代码,我的图表显示垂直线(只需要零)

请提供一些删除所有水平线(零除外)的示例

编辑: 即使在
yAxis.setLabelCount(1)
(1,因为需要显示零值)时,impl看起来像:

public void setLabelCount(int yCount) {
    if(yCount > 25) {
        yCount = 25;
    }

    if(yCount < 2) {
        yCount = 2;
    }

    this.mLabelCount = yCount;
}
public void setLabelCount(int yCount){
如果(Y计数>25){
yCount=25;
}
如果(Y计数<2){
yCount=2;
}
this.mLabelCount=yCount;
}

那么,是否建议覆盖此实现?

我得到了底部带有标签的解决方案

在代码中使用此选项


你有办法吗?
public void setLabelCount(int yCount) {
    if(yCount > 25) {
        yCount = 25;
    }

    if(yCount < 2) {
        yCount = 2;
    }

    this.mLabelCount = yCount;
}
mXAxis = mChart.getXAxis();
mXAxis.setDrawGridLines(false);
mXAxis.setEnabled(true);
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);