dynamic chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
raviteja

dynamic chart

Post by raviteja » Sat Dec 28, 2002 5:55 am

HI David,

I develped a Dynamic Chart using the JFreeChart API.
Only TimeSeries.Firstly Thanks for excellent support u have extended to me.

Explanation of the process:

When ever a new packet(required for the chart) comes from the broadcast , i'm rebuilding the whole chart process.
i'm trying to generate stock charts.Subsequently when the data is large
the "cpu usage is reaching 100%" which yet times resulted in system hang up.

there is no problem with the package u develped..
why i'm trying to explain all this is..

Is the information u gave abt the dynamic chart(priced version) documention,can help me in getting rid of this problem.

One more thing i noticed is that the dynamic chart demo u gave in "JFreeChartDemo" is also using high percentages of cpu.


In short, i would like to know some thing more abt the Dyanamic chart comcept your are employing in the JFreeChart Package.

are u building the entire chart when the new data is added or you r drawing only the latest point appending to the existing graph.


thanking u once again


regards
RaviTeja Bellakonda

RaviTeja

Re: dynamic chart

Post by RaviTeja » Mon Jan 06, 2003 5:51 am

Hi David,


I hope u had a great holiday.

A Very Happy New Year.

Can u give me some support on Dynamic Chart.
I explained the whole problem Above.
Hoping to hear from u soon

regards
Ravi Teja

David Gilbert

Re: dynamic chart

Post by David Gilbert » Tue Jan 07, 2003 12:07 pm

Hi Ravi,

The whole chart gets redrawn when new data is added to the dataset. It would be more efficient, of course, to just draw the new data only. But then the implementation becomes much more difficult - is the new data only at the right hand side of the chart, do the axis ranges need to change, how do we "scroll away" old data, does the anti-aliasing cause artifacts etc. etc.

I've gone for the complete redraw approach primarily because it is simpler, and JFreeChart is a general chart package not one specifically designed for dynamic charts.

If you wanted to, though, you could probably rip out the bits you need from JFreeChart and create something tailored specifically for dynamically updated charts.

Regards,

Dave Gilbert

Locked