BeginUpdate/Endupdate at TChart level (not single series)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

BeginUpdate/Endupdate at TChart level (not single series)

Post by Hans Hasenack » Mon Mar 05, 2007 12:32 pm

Which allows me to to fill all series with data, and only after the endupdate call will recalculate dependant series and redraw the chart.

It's already there -> let me apologize? where?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Mar 05, 2007 2:09 pm

Hi Hans,

I'm afraid there are no such methods at TChart level. However, you could try using TChart's OnBeforeDraw and OnAfterDraw events.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

This is my ever-easy patch

Post by Hans Hasenack » Mon Mar 05, 2007 2:13 pm

// HH This allows for an enormous optimization. Just call BeginUpdate before adding
// a lot of datapoints, and afterwards call EndUpdate
// All calculated series will be delayed until after adding all datapoints
procedure TCustomChart.BeginUpdate;
VAR i:integer;
begin
for i:=0 to SeriesList.Count-1 do
begin
SeriesList.BeginUpdate;
end;
end;

procedure TCustomChart.EndUpdate;
VAR i:integer;
begin
for i:=0 to SeriesList.Count-1 do
begin
SeriesList.EndUpdate;
end;
end;

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Mar 05, 2007 2:23 pm

Hi Hans,

Thanks for your suggestion. I've also added it to the list to be reviewed for next releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply