I have a TDBChart which contains various series, some linked to a datasource and others created and populated at runtime.
In the attached screenshot there are TAreaSeries with custom vertical axes created at runtime.
Before I (re)create the series, I destroy the series as in code below.
The problem is that this takes quite some time where I see the hour glass flicker for each series that is destroyed.
Is there a way to avoid this ?
Code: Select all
// delete series
I := 0;
while I < FSeries.Count do begin
if FSeries[I].SeriesType = fts_ZoneLevel then begin
Series := FSeries[I].Series as TAreaSeries;
Axis := Series.CustomVertAxis;
if not FZoneLevelSingleAxis then
Axis.Free;
Series.Free;
FSeries[I].Free;
end else begin
Inc(I);
end;
end;