Tcolorgridseries and speed

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

Tcolorgridseries and speed

Post by seanmurphy » Fri Sep 01, 2006 3:56 pm

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
begin
for y:=1 to ylimit do
begin
series.addxyz(x,data[y].values[x],y);
end;
end;

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?

thanks
Sean

SteveP
Advanced
Posts: 132
Joined: Sun Sep 07, 2003 4:00 am

Post by SteveP » Tue Sep 05, 2006 12:51 pm

Sean,

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.

Steve

Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Post by Michal Blazejczyk » Tue Sep 05, 2006 9:03 pm

Hi

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.

Best,
Michal Blazejczyk
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec

Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Post by Michal Blazejczyk » Tue Sep 05, 2006 9:06 pm

Oops, my e-mail: michal.blazejczyk_AT_mail.mcgill.ca.
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec

seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

Post by seanmurphy » Wed Sep 06, 2006 1:59 pm

thanks Michal,

that address seems to be wrong though?
Sean

Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Post by Michal Blazejczyk » Wed Sep 06, 2006 2:37 pm

Hi,

Again, my e-mail address is michal.blazejczyk_AT_mail.mcgill.ca, just replace _AT_ with @.

Michal
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec

Post Reply