我将 MPAndroidChart 从 v1.7 升级到 v2,并且必须更改一些内容。
新的事情之一是我现在似乎有一个最大值的顶部边框。
我试图隐藏所有边框的代码是这样的:
LineChart graph = (LineChart) connectionView.findViewById(R.id.graph);
graph.setDrawGridBackground(false);
graph.setDrawBorders(false);
graph.setDescription("");
YAxis yr = graph.getAxisRight();
yr.setEnabled(false);
yr.setDrawAxisLine(false);
YAxis yl = graph.getAxisLeft();
yl.setValueFormatter(formatierer);
yl.setShowOnlyMinMax(true);
yl.setDrawAxisLine(false);
XAxis xl = graph.getXAxis();
xl.setPosition(XAxis.XAxisPosition.BOTTOM);
xl.setDrawGridLines(false);
xl.setDrawAxisLine(false);
yl.setAxisMaxValue((float) graphpoint_max);
不过 - 我有一条线显示最大值。我想要 Y 轴上的值,但没有水平轴线/边框。我找不到任何命令来隐藏它。
你试过打电话吗setDrawAxisLine(...)
or setDrawGridLines(...)
on the YAxis
?
这里是全轴文档 https://github.com/PhilJay/MPAndroidChart/wiki/The-Axis.
这是仅适用于 YAxis 的文档 https://github.com/PhilJay/MPAndroidChart/wiki/YAxis-%28YLabels%29.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)