GraphView库删除系列
我一直在使用 Graphview 库,它对于我的简单图表非常有用。但关于这个库的信息并不多,我想知道如何删除一个系列。
我正在刷新来自微调器的数据,但他们只是在图表中添加了一条新线,所以我必须先清除它。
我确实搜索了很多,尝试了很多,但一无所获。
最好我想要一个清晰的所有系列函数,这样我就不必将系列放入变量中。
我能找到有关该库的唯一信息是在这里 http://www.jjoe64.com/2011/07/chart-and-graph-library-for-android.html
我知道这段代码将实现该功能,但是是否可以将其添加到一个拥挤的图书馆,又如何?
public boolean removeSeries(GraphViewSeries series) {
boolean result;
result = false;
if (graphSeries.contains(series)) {
graphSeries.remove(series);
result = true;
}
return result;
}
I have been using the Graphview library, and its working great for my simple graphs. But there isnt really much information on this library, and i was wondering how i can remove a series.
I am refreshing the data from at spinner but they just add a new line at the graph, so i gotta clear it first.
I did search a lot, and try a lot, but found nothing.
Preferably i would like a clear all series function, so i dont have to put the series into variables.
The only information i could find about the library is here http://www.jjoe64.com/2011/07/chart-and-graph-library-for-android.html
I know that this code will make the function, but is it possible to add it to a packed library, and how?
public boolean removeSeries(GraphViewSeries series) {
boolean result;
result = false;
if (graphSeries.contains(series)) {
graphSeries.remove(series);
result = true;
}
return result;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
几天前在此拉取请求中添加了removeSeries方法: https://github.com/ jjoe64/GraphView/pull/6
A removeSeries method was added a few days ago, in this pull request: https://github.com/jjoe64/GraphView/pull/6