mpandroidchart-如何更新限制线位置?
我正在尝试动态更新极限线的位置。现在,我只能在创建线路时设置位置。稍后如何更改位置?
LimitLine ll = new LimitLine(0f, "");
YAxis leftAxis = chart.getAxisLeft();
leftAxis.addLimitLine(ll);
// Set new position here...
I am trying to dynamically update the position of a LimitLine. For now, I can only set the position when I create the line. How can I change the position later?
LimitLine ll = new LimitLine(0f, "");
YAxis leftAxis = chart.getAxisLeft();
leftAxis.addLimitLine(ll);
// Set new position here...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更新您的限制线和Indoke Chart.invalidate(),然后更改了位置。在演示代码linechartactivity.java中,以这种方式进行了限制,限制线将自动更改:
Update your limitline and invoke chart.invalidate() then the position is changed. In the demo code LineChartActivity.java, onProgressChanged, by this way, the limitline will changed automatically: