Hi, everybody.
I've just started working with charts, and I was wondering if any of you have sample code for a simple dynamic chart, where you supply the y value every n seconds and the chart gets updated (something like a Task Manager for windows).
I've looked and the code for the demo dynamic chart, and followed it's example. However, I only get the dotted lines in the intersection of the generated values, but the graph itself is not drawn.
Please help.
Thank you,
-Vicky
Dynamic chart sample code
Re: Dynamic chart sample code
Hi Vicky,
I've written a small sample application to show dynamic data updates - it has a single time series, and every time you click a button it adds a random value to the time series and updates the chart.
The code relies on some changes I have made to the core classes, including a bug fix to the Millisecond class and some changes to the TimeSeriesCollection class...so I won't post it now, but it will be included with version 0.8.1 (hopefully out during next week).
Regards,
Dave Gilbert
I've written a small sample application to show dynamic data updates - it has a single time series, and every time you click a button it adds a random value to the time series and updates the chart.
The code relies on some changes I have made to the core classes, including a bug fix to the Millisecond class and some changes to the TimeSeriesCollection class...so I won't post it now, but it will be included with version 0.8.1 (hopefully out during next week).
Regards,
Dave Gilbert
Re: Dynamic chart sample code
Hi,
How is the performance of FreeChart for frequently updating data? We did a sample application recently using the Chart2D library to poll a router every 10 seconds and chart its results on screen. Just wanted to add a point to the right side of the chart every 10 seconds, similar to what Vicky is trying. The chart looked great, but the performance was awful. Does FreeChart handle dynamic data better?
Thanks,
Jim
How is the performance of FreeChart for frequently updating data? We did a sample application recently using the Chart2D library to poll a router every 10 seconds and chart its results on screen. Just wanted to add a point to the right side of the chart every 10 seconds, similar to what Vicky is trying. The chart looked great, but the performance was awful. Does FreeChart handle dynamic data better?
Thanks,
Jim
Re: Dynamic chart sample code
Jim Buchman wrote:
> Does FreeChart handle dynamic data better?
I can't make any comparisons since I've not tried out Chart2D yet. But if you are updating your chart only once every ten seconds then I don't think you will encounter any performance problems with JFreeChart.
Version 0.8.1 is getting close, and will include the demo I mentioned previously...
Regards,
DG.
> Does FreeChart handle dynamic data better?
I can't make any comparisons since I've not tried out Chart2D yet. But if you are updating your chart only once every ten seconds then I don't think you will encounter any performance problems with JFreeChart.
Version 0.8.1 is getting close, and will include the demo I mentioned previously...
Regards,
DG.
Re: Dynamic chart sample code
Now that version 0.8.1 is released, you can try out the demo:
com.jrefinery.chart.demo.DynamicDataDemo
Regards,
DG.
com.jrefinery.chart.demo.DynamicDataDemo
Regards,
DG.
Re: Dynamic chart sample code
Hi,
I am using JFreeChart for plotting dynamic TimeSeries charts (maximum 4 charts in a screen) with minimum refresh interval 1 second. No performance problem so far.
regards,
Reji Mani
I am using JFreeChart for plotting dynamic TimeSeries charts (maximum 4 charts in a screen) with minimum refresh interval 1 second. No performance problem so far.
regards,
Reji Mani
Re: Dynamic chart sample code
Reji Mani wrote:
> I am using JFreeChart for plotting dynamic TimeSeries charts
> (maximum 4 charts in a screen) with minimum refresh interval
> 1 second. No performance problem so far.
Great! Thanks for the feedback...
DG.
> I am using JFreeChart for plotting dynamic TimeSeries charts
> (maximum 4 charts in a screen) with minimum refresh interval
> 1 second. No performance problem so far.
Great! Thanks for the feedback...
DG.