Hi, I've purchased the docs, but am still too new to this and am a bit stuck.
What's the best approach to plotting data that changes every iteration...
ie. three lines, each one a different value on the y axis, and the x axis increases by 1 each iteration for all three.
How do I get the chart to refresh? Do I need a DatasetChangeEvent or is it automatic.
Sorry for the basic questions, but I'm really not sure what the best way to do this is.
Thanks
XY Plotting Refresh
Re: XY Plotting Refresh
If you use three XYSeries objects (call them series1, series2 and series3), add them all to an XYSeriesCollection and use that as your dataset, then all you need to do is add your data to series1, series2 and series3...the chart will update automatically.
On the documentation download page, there is a zip file containing some additional examples. You might want to look at the MemoryUsage.java application, it uses TimeSeries and TimeSeriesCollection (rather than XYSeries and XYSeriesCollection), and illustrates the procedure by charting the total and free memory in the JVM, updating several times per second.
If you have further questions, please ask...
Regards,
DG
On the documentation download page, there is a zip file containing some additional examples. You might want to look at the MemoryUsage.java application, it uses TimeSeries and TimeSeriesCollection (rather than XYSeries and XYSeriesCollection), and illustrates the procedure by charting the total and free memory in the JVM, updating several times per second.
If you have further questions, please ask...
Regards,
DG