I have an application (simulation) where a chart frame is displayed continuously while live updates are being made to the underlying data by a separate piece of code. When the simulation is reset, I would like the chart to go back to its initial (empty) state and then grow again as new data is added without having to destroy and recreate the chart frame instance.
I searched the XYSeries API and the XYSeriesCollection API for any methods that would allow me to remove all data points from an XYSeries or even remove an entire series from an XYSeriesCollection but could not find any.
Is there a philosophical reason that data can not be removed from a dataset? If there is no opposition from a design point of view, can I submit a patch to XYSeries that allows an XYSeries to be emptied and the appropriate listeners notified?
Removing Data from a series or a series from a collection.
Re: Removing Data from a series or a series from a collectio
Hi Aaron,
There's no reason (that I can think of) why you can't empty or delete a series...I just haven't implemented anything yet. So any patches would be welcome.
Note that you can replace an existing dataset with a new empty dataset if you want to...the chart should refresh OK. But it would be nicer to be able to empty an existing dataset and recycle it.
Regards,
DG.
There's no reason (that I can think of) why you can't empty or delete a series...I just haven't implemented anything yet. So any patches would be welcome.
Note that you can replace an existing dataset with a new empty dataset if you want to...the chart should refresh OK. But it would be nicer to be able to empty an existing dataset and recycle it.
Regards,
DG.