如何在 MPandroidchart 中将参考点 0 更改为 100?

how to change reference point 0 to 100 in MPandroidchart?

现在我用MP android图表显示千瓦时数据,这个要求需要设置基准为100千瓦时,如果值大于100,线会画在上面benchmark,小于100当然低于benchmark。 我想将 y 轴上的基准从 0 更改为 100,但我没有从文档中找到任何有用的信息。有人可以对此提出任何建议吗?

这可能会有所帮助。

YAxis y = chart.getAxisLeft();
y.setAxisMaxValue(100);
y.setAxisMinValue(0);

参考文档:https://github.com/PhilJay/MPAndroidChart/wiki/YAxis

像这样添加一些东西

 yAxis.setAxisMinValue(0);`

use same 100 as Maximum.Refer MPAndroid Documentation