Hi,
I am desperately seeking a way to both save and load chart settings without data as well as with. I understand that SaveChartToFile can be paramaterised so that only the chart settings are exported - and not the data - which is ideal. However, when loading the settings back in I find that the chart no longer works with my code, flagging invliad references to the TLineSeries object that was there previously. If I reference the TChartSeries - e.g. Chart1.Series[0] - then it works but my code is deisgned to interact with the TLineSeries object (Series1) and I would ideally not like to change this. Is there something I an do to get round this issue?
LoadChartFromFile/SaveChartToFile help needed!
-
- Newbie
- Posts: 36
- Joined: Wed Aug 24, 2016 12:00 am
Re: LoadChartFromFile/SaveChartToFile help needed!
Hello,
The variables aren't stored in the object so the chart can't recreate them when loading the tee file.
However, you can reassign them if you want. Ie with a TPieSeries:
The variables aren't stored in the object so the chart can't recreate them when loading the tee file.
However, you can reassign them if you want. Ie with a TPieSeries:
Code: Select all
uses Chart, Series, TeeConst, TeeStore;
procedure TForm1.FormCreate(Sender: TObject);
var Chart1: TChart;
Series1: TPieSeries;
begin
Chart1:=TChart.Create(Self);
LoadChartFromFile(Chart1, 'C:\tmp\pie.tee');
Chart1.Parent:=Self;
Series1:=Chart1[0] as TPieSeries;
Series1.Circled:=false;
end;
initialization
RegisterTeeSeries(TPieSeries, @TeeMsg_GalleryPie, @TeeMsg_GalleryStandard, 1);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |