Page 1 of 1

Tcolorgridseries and speed

Posted: Fri Sep 01, 2006 3:56 pm
by 9231397
I've read the aticle on optimising Tchart for speed, this seems to deal mostly with fastline series. I have a window with 12 chart which each have a single tcolorgrid series. I have x/y/zvalues order set to Ionone. Each series is populated with

for x:=1 to xlimit do
for y:=1 to ylimit do

thus chart gets xlimit vertical columns (typically 2000 to 3000)
and ylimit horizontal bars (typically 250 to 350), and the x,y point colour is controlled by the z value and a colour palette.

I have the series.usepalette set true,
series.usecolorrange set false

and am using series.addpalette to control point colors

All works fine, but is very slow (Win XP, 2 Gigs ram, decent PC). Are there any tips for speeding up tcolorgrid series. Would I be better rolling my own and having a chart with 250-350 fastlineseries, and then just setting the individual points on each fastline for colour?


Posted: Tue Sep 05, 2006 12:51 pm
by 9333098

A faster option is to prepare a bitmap from your data 2D array and assign it to the chart's BackImage. You do have to deal with issues such as whether several data points span more than one bitmap pixel or not.


Posted: Tue Sep 05, 2006 9:03 pm
by 9641603

Actually, you can use the Bitmap property of ColorGrid. E-mail me and I'll e-mail you code that creates a bitmap like that from data.

Michal Blazejczyk

Posted: Tue Sep 05, 2006 9:06 pm
by 9641603
Oops, my e-mail:

Posted: Wed Sep 06, 2006 1:59 pm
by 9231397
thanks Michal,

that address seems to be wrong though?

Posted: Wed Sep 06, 2006 2:37 pm
by 9641603

Again, my e-mail address is, just replace _AT_ with @.