TimeSeries Exception

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Moussa A. Ba

TimeSeries Exception

Post by Moussa A. Ba » Tue Oct 29, 2002 7:49 pm

Good Day, I using the BasicTimeSeries and updating the dataset when I received a particular event. Often while the code is running I get the following exceptions:

com.jrefinery.data.SeriesException: TimeSeries.add(...): time period already exists.

at com.jrefinery.data.BasicTimeSeries.add(Unknown Source)

at com.jrefinery.data.BasicTimeSeries.add(Unknown Source)

What causes this and how can I fix it? I am basically using the BasicTimeSeries with a dynamic chart.

Moussa

Moussa A. Ba

Re: TimeSeries Exception

Post by Moussa A. Ba » Wed Oct 30, 2002 12:59 am

I think the problem is that my data is coming too fast, therefore some data is overwritten, looking at you code that would explain the exception thrown.
I guess what I need is addOrUpdate(..) however, I guess it is missing an event fire method. I assume that I have to make the change and recompile the package?

ThankYou.

Musa

Dave Gilbert

Re: TimeSeries Exception

Post by Dave Gilbert » Wed Oct 30, 2002 1:04 am

Hi Musa,

Yes, the fireSeriesChanged() call is missing...I've added it to my source tree, so it will be fixed in 0.9.5.

Regards,

DG

Locked