Memory issue with DBChart
Posted: Mon Sep 08, 2008 4:44 am
I found that linking a chart to a data source and then using:
(*
Series1.DataSource := DataTable;
Series1.CheckDataSource;
*)
was very slow plotting points and crashed with memory allocation with around 9,000 XY points.
Manually adding the XY coords was a lot faster and did not cause a memory issue. eg
(*
while not DataTable.EOF do
begin
NumPts := NumPts + 1;
Series1.AddXY(DataTable.FieldByName('DateTime').AsDateTime, DataTable.FieldByName('Value').AsFloat);
DataTable.Next;
end;
*)
(*
Series1.DataSource := DataTable;
Series1.CheckDataSource;
*)
was very slow plotting points and crashed with memory allocation with around 9,000 XY points.
Manually adding the XY coords was a lot faster and did not cause a memory issue. eg
(*
while not DataTable.EOF do
begin
NumPts := NumPts + 1;
Series1.AddXY(DataTable.FieldByName('DateTime').AsDateTime, DataTable.FieldByName('Value').AsFloat);
DataTable.Next;
end;
*)