使用 JFreeChart 在时间序列中显示最近的变化

2022-01-11 00:00:00 time-series dynamic java jfreechart

如何使用 JFreeChart 仅显示最新数据在不断更新的时间序列中?

How can I use JFreeChart to display just the most recent data in a continually updated time series?

附录:此处显示了包含已接受答案的完整工作示例.另请参阅具有两个系列的 变体.另请参阅此 Q&A 关于 setTimeBase().

Addenda: A complete, working example that incorporates the accepted answer is shown here. See also this variation having two series. See also this Q&A regarding setTimeBase().

推荐答案

也可以先advanceTime(),再appendData来消除零.(在示例中交换他们的操作方式).

You can also eliminate the zero by first advanceTime(), then appendData. (swap the way they are doing it in the example).

相关文章