[Solved] Jfreechart add months instead of numbers


Please have a look at the org.jfree.demo.TimeSeriesChartDemo1 class that is included in the JFreeChart download. The source code is included in the source download of JFreeChart, so it’s a good point to start with. I think that’s what you want.

Update (revised on your comment):

You can change the format of axis labels by redefining the formatter.

In TimeSeriesChartDemo1 there are two lines that define the format of the date axis. Change it as follows to show month names as labels only.

    DateAxis axis = (DateAxis)plot.getDomainAxis();
    axis.setDateFormatOverride(new SimpleDateFormat("MMM"));

8

solved Jfreechart add months instead of numbers