Looking for ways to update JFreePieCharts on the fly

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
lucky7456969
Posts: 15
Joined: Thu Nov 01, 2012 6:41 am
antibot: No, of course not.

Looking for ways to update JFreePieCharts on the fly

Post by lucky7456969 » Sun Nov 18, 2012 11:06 am

How do I update a JFreeChart live?
When a user adds data to the data model, I'd like to change the chart straight away
Do you have any listeners for this usage?
Thanks
Jack

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

Re: Looking for ways to update JFreePieCharts on the fly

Post by matinh » Wed Nov 21, 2012 10:00 am

Hi!

If you use the default dataset implementations, that happens automatically.
If you implemented your own dataset you have to notify the listeners. Have a look at the AbstractDataset.fireDatasetChanged() method for details.

hth,
- martin

Locked