Chart speedup

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
merula
Posts: 2
Joined: Fri Oct 13, 2006 7:15 am
Location: Germany

Chart speedup

Post by merula » Fri Oct 13, 2006 7:39 am

Hi,

to speed up my xy-chart (let's say 1.000 curves of 10.000 data points) I wanted to write a view, that delivers only say 500 or less data points to the chart depending on (screen)size and zoom.
This points should be averaged (every 200th point, arithmetic or weighted mean over 200 points or whatever) or only a subset of the data, when the users zooms in or a mixture of both.

My first intention was to do this in a self written XYSeries. But XYSeries lacks the information of plot width. The Renderer does have this information but it would be against any intuition to do such a task in a renderer. Besides the renderer gets a paint command for every datapoint in the array and averaging this way would be at least a 'hard to read' code.

OK, what else is left. Maybe the XYPlot. It has information about both display size and data series. So an idea would be to create a reduced XYSeries based on the orignal one an the size information and to render this instead of the real data.

Is there a niftier solution to my problem or is this the way to do it?

cheers

Lars

rantfoil
Posts: 9
Joined: Tue Dec 06, 2005 9:53 pm

Post by rantfoil » Tue Oct 17, 2006 10:44 am


Locked