最佳答案
您可能正在寻找粒度 - 参见the wiki page for the axis和 javadoc .
这样调用:
mChart.getXAxis().setGranularity(0.3f);
mChart.getXAxis().setGranularityEnabled(true);
将确保 0.3
是放大时轴上的最小间隔。除此之外,您可能需要通过调用以下方法调整 x 轴的比例:
mChart.getXAxis().setAxisMinValue(10.01f); //experiment with these values
mChart.getXAxis().setAxisMaxValue(10.14f);
mChart.getXAxis().setLabelCount(5);
关于android - 如何为 MPAndroidChart 中的每个 y 值设置 x 轴标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44415358/