Using JFreeChart to display recent changes in a time series

dynamic, java, jfreechart, time-series

Solution

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

Problem

How can I use `JFreeChart` to display just the most recent data in a continually updated time series? 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()`.

Original source

Related problems