time-series - 清除系列并将其他系列保留在 JFreeChart 中

标签 time-series jfreechart

我正在使用 JFreeChart 创建一个包含 6 个时间序列的图表。
问题:当我在其中一个系列上调用 .clear() 时,所有其他系列都被隐藏了:

    this.Series1.clear();

问题:我应该如何清除一个系列而不让其他系列消失?

在“红色”系列上调用 .clear() 之前。
enter image description here

在“红色”系列上调用 .clear() 之后。
enter image description here

最佳答案

我使用其中任何一个得到了预期的结果:

dataset.removeSeries(0);
dataset.getSeries(0).clear();

您可能需要验证每个 TimeSeries 都是不同的实例。

关于time-series - 清除系列并将其他系列保留在 JFreeChart 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8694840/

相关文章:

python - 对列多个文件 Pandas 的操作

r - 执行数学运算后在时钟时间内显示时间

python - 从不规则时间序列索引重新采样的 pandas DataFrame

java - 如何在 JFrame JLabel 中显示 JFreeChart

python - 我怎样才能得到 Pandas 的条件每小时平均值?

python - 时间序列数据python的Lowess平滑

jsp - Jfreechart:可以更改条形颜色吗?

java - 将 dataset.addSeries 与 Long[] 值一起使用

java - Y 轴在 JFreeChart 中未显示百万和十亿的正确数字

java - 如何在java Swing应用程序中将ChartPanel添加到Jpanel