How can I "refresh" the plot, if my data changes ?
At the moment, the plot is only refreshed if I make a mouse click on it.
I'm using JFreeChart for the first time, so I need some help.
Thank you
Michaela
changing data in XYPlot
Re: changing data in XYPlot
Hi Michaela,
The JFreeChart object registers itself automatically with the XYDataset to receive DatasetChangeEvent notifications. This registration happens in the JFreeChart constructor, and also the setDataset(...) method.
If you are implementing your own dataset you need to remember to generate the event notifications, otherwise the chart will not be aware that it needs to redraw itself.
Regards,
DG.
The JFreeChart object registers itself automatically with the XYDataset to receive DatasetChangeEvent notifications. This registration happens in the JFreeChart constructor, and also the setDataset(...) method.
If you are implementing your own dataset you need to remember to generate the event notifications, otherwise the chart will not be aware that it needs to redraw itself.
Regards,
DG.