Plot Updatting

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

Plot Updatting

Post by Marty » Mon Sep 30, 2002 5:24 pm

I was just wondering if it is possible to stop an xy time chart from updating automatically if not can I remove a data series from a collection?

David Gilbert

Re: Plot Updatting

Post by David Gilbert » Mon Sep 30, 2002 6:11 pm

Hi Marty,

Some changes have been committed to CVS to allow you to specify a data 'window' for a BasicTimeSeries. The 'window' is specified as N time periods. When new data is added to the series, anything older than N time periods before the latest value automatically gets deleted. This will be released with 0.9.4 some time during October.

In 0.9.3, you can use the setFixedAutoRange(...) method in the ValueAxis class to set a 'viewing window' on your data. This changes the auto-range calculation to set the minimum axis value relative to the maximum axis value (by subtracting the 'fixed auto range' value). This has the effect of making old data scroll off the axis as new data is added. But no data gets deleted, so when data scrolls off a chart it still gets retained in memory, which sometimes isn't what you want (hence the changes mentioned in the first paragraph).

Regards,

DG.

Locked