GraphView库删除系列

发布于 2024-12-17 07:05:19 字数 644 浏览 3 评论 0原文

我一直在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

み格子的夏天 2024-12-24 07:05:19

几天前在此拉取请求中添加了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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文