Creating a time series with jfreechart

You might have a look at org.jfree.chart.demo.TimeSeriesChartDemo1, and the associated API documentation. A typical command to run the demo might look like this:

java -cp lib/jfreechart-1.0.13.jar:lib/jcommon-1.0.16.jar \
org.jfree.chart.demo.TimeSeriesChartDemo1

image

The example uses org.jfree.data.time.Month to represent monthly data, but other units are available in org.jfree.data.time. See also the approach shown in this related example, which is based on TimeSeriesChartDemo1.

Leave a Comment