method for changing Bar chart data

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Billy O'Connell

method for changing Bar chart data

Post by Billy O'Connell » Tue Jan 28, 2003 4:30 pm

Can anybody tell me if there is a method for changing the chart data.

I'm looking for a method that can be called to change the bar chart (for example, in response to a user clicking on a list in a GUI).

Thanks in advance,
Billy

David Gilbert

Re: method for changing Bar chart data

Post by David Gilbert » Wed Jan 29, 2003 12:24 am

You can replace the dataset entirely using the setDataset(...) method that all plots inherit from the Plot class. Or you can use the methods of whatever dataset class you are using to modify the content of the current dataset, and the chart should update automatically.

Regards,

Dave Gilbert

Locked