MPAndroidChart - 删除自V2顶部边框/轴 [英] MPAndroidChart - Remove top border / axis since v2
问题描述
我升级MPAndroidChart从V1.7到v2和后来换了几件事情。
其中一个新的东西是我现在似乎有一个顶部边框的最大值。
I upgraded MPAndroidChart from v1.7 to v2 and had to change a couple things. One of the new things is that i now appear to have a top border for the maximum value.
我的code试图隐藏所有的边界是这样的:
My code trying to hide all borders is like this:
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轴的数值,但没有水平轴线/边界。我无法找到任何命令来隐藏它。
Still - i have a line showing the maximum value. I want to have the values on the YAxis but have no horizontal axis lines / borders. I wasn't able to find any command to hide it.
推荐答案
你有没有打过电话 setDrawAxisLine(...)
或 setDrawGridLines(。 ..)
在 Y轴
Have you tried calling setDrawAxisLine(...)
or setDrawGridLines(...)
on the YAxis
?
下面是满轴文档。
这里是为Y轴文档仅供。
这篇关于MPAndroidChart - 删除自V2顶部边框/轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!