Series1.AddXY after LoadChartFromFile
Posted: Thu Dec 30, 2004 12:19 pm
I'm using a TChart with one TLineSeries on a Form (Created in Delphi IDE Designer). I will load a Chart from a file - then I will add new points to my Series.
I tried following code:
Series1.AddXY(1,1);
SaveChartToFile(Chart1, 'c:\temp\chart.tee', true,false);
LoadChartFromFile(TCustomChart(Chart1), 'c:\temp\chart.tee');
Series1.AddXY(2,2); -> Access violation cause Series is nil after loading!!!
How can I get the new pointer of the Series1 to add new points after loading chart from a file?
Tanks.
I tried following code:
Series1.AddXY(1,1);
SaveChartToFile(Chart1, 'c:\temp\chart.tee', true,false);
LoadChartFromFile(TCustomChart(Chart1), 'c:\temp\chart.tee');
Series1.AddXY(2,2); -> Access violation cause Series is nil after loading!!!
How can I get the new pointer of the Series1 to add new points after loading chart from a file?
Tanks.