Page 1 of 1
BeginUpdate/Endupdate at TChart level (not single series)
Posted: Mon Mar 05, 2007 12:32 pm
by 9349350
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?
Posted: Mon Mar 05, 2007 2:09 pm
by narcis
Hi Hans,
I'm afraid there are no such methods at TChart level. However, you could try using TChart's OnBeforeDraw and OnAfterDraw events.
This is my ever-easy patch
Posted: Mon Mar 05, 2007 2:13 pm
by 9349350
// 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;
Posted: Mon Mar 05, 2007 2:23 pm
by narcis
Hi Hans,
Thanks for your suggestion. I've also added it to the list to be reviewed for next releases.