
Help!
Re: Help!
Hi Paul,
Have a look at the classes TimeSeriesDemo1, TimeSeriesDemo2, etc. in the src/com/jrefinery/chart/demo directory. They show you how to create a time series with different time periods.
If you want to use an arbitrary timestamp, then use the FixedMillisecond time period subclass. It is really just a wrapper for java.util.Date. It would go something like this:
BasicTimeSeries s1 = new BasicTimeSeries("S1", FixedMillisecond.class);
s1.add(new FixedMillisecond(date1), 181.
;
s1.add(new FixedMillisecond(date2), 167.3);
...
TimeSeriesCollection collection = new TimeSeriesCollection(s1);
where date1 and date2 are any (distinct) instances of java.util.Date.
Regards,
DG.
Have a look at the classes TimeSeriesDemo1, TimeSeriesDemo2, etc. in the src/com/jrefinery/chart/demo directory. They show you how to create a time series with different time periods.
If you want to use an arbitrary timestamp, then use the FixedMillisecond time period subclass. It is really just a wrapper for java.util.Date. It would go something like this:
BasicTimeSeries s1 = new BasicTimeSeries("S1", FixedMillisecond.class);
s1.add(new FixedMillisecond(date1), 181.

s1.add(new FixedMillisecond(date2), 167.3);
...
TimeSeriesCollection collection = new TimeSeriesCollection(s1);
where date1 and date2 are any (distinct) instances of java.util.Date.
Regards,
DG.