How to set first value to be plotted in Time Series

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
kchemweno
Posts: 5
Joined: Fri Dec 18, 2009 9:52 am
antibot: No, of course not.

How to set first value to be plotted in Time Series

Post by kchemweno » Wed Jun 09, 2010 10:53 am

Hi people,
Am trying to plot a chart that uses more than two TimeSeries in a collection.
My problem is, I would like to determine the values that are plotted first, that is the beginning of the time series.
For example,

when i have the following values added to the timeseries, I want to be able to set or change the value which will appear first.

Code: Select all

  
final TimeSeries seriesOne = new TimeSeries("2008", Month.class);
        seriesOne.add(new Month(Month.JUNE, 2009), 14.6);
        seriesOne.add(new Month(Month.JULY, 2009), 11.9);
        seriesOne.add(new Month(Month.AUGUST, 2009), 13.5);
        seriesOne.add(new Month(Month.SEPTEMBER, 2009), 10.9);
        seriesOne.add(new Month(Month.OCTOBER, 2009), 11.9);
If I want to set the August to be at the beginning of the chart, how do i do that. I thought the order in which they are added to the time series will determine how they will appear on the chart, having done a demo, my theory was disapproved.

Please help. Thanks.

Locked