DynamicTimeSeriesCollection limitation

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
steveb
Posts: 4
Joined: Wed Jun 13, 2012 1:30 pm
antibot: No, of course not.

DynamicTimeSeriesCollection limitation

Post by steveb » Wed Jun 13, 2012 1:42 pm

The DynamicTimeSeriesCollection looks like the dataset I'd like to use, but the current constructor will only set up the points if the RegulartTimePeriod is a Second, Minute, or Hour.

I am feeding daily events to a simulator model with a range over a couple years, so would like the code extended to also allow the Day time period. And maybe a warning for the other cases of a TimePeriod that are not supported, as a null pointer will be generated when trying to use the resulting object.

thanks,
Steve

matinh
Posts: 483
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Re: DynamicTimeSeriesCollection limitation

Post by matinh » Wed Jun 13, 2012 2:42 pm

Hi!

I haven't used this dataset myself but it seems support RegularTimePeriods bigger than hour are just not supported at the moment. Try subclassing DynamicTimeSeriesCollection and just providing another constructor which adapts the pointsInTime. If you are luck, this will solve your problem.

hth,
- martin

John Matthews
Posts: 513
Joined: Wed Sep 12, 2007 3:18 pm

Re: DynamicTimeSeriesCollection limitation

Post by John Matthews » Wed Jun 13, 2012 5:16 pm

There's an example of martin's suggestion here for Millisecond.

steveb
Posts: 4
Joined: Wed Jun 13, 2012 1:30 pm
antibot: No, of course not.

Re: DynamicTimeSeriesCollection limitation

Post by steveb » Wed Jun 13, 2012 7:24 pm

Thanks, this is working for me, doing the same thing with Day instead of Millisecond.

Locked