Hi,
I have used the following example( from your examples):
procedure TForm1.ButtonSaveClick(Sender: TObject);
begin
SaveChartToFile(Chart1,'C:\test.tee');
end;
procedure TForm1.ButtonLoadClick(Sender: TObject);
var tmpChart:TCustomChart;
begin
Chart1.Free; //assuming Chart1 is already on the Form
tmpChart:=TChart.Create(Self)
LoadChartfromFile(tmpChart,'c:\test.tee');
Chart1 := tmpChart as TChart;
Chart1.Parent:=Self;
end;
I cant get this to work, I get the follwing exception "Class TBarSeries not found". Does anyone know what might cause this problem, is there something I have forgotten?
Best regards
Johan Ingemansson
Problem with LoadChartFromFile
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Johan,
Just using the code below works fine. Can you please test if this works at your end?
Just using the code below works fine. Can you please test if this works at your end?
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
LoadChartfromFile(TCustomChart(DBChart1),OpenDialog1.FileName);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if SaveDialog1.Execute then
SaveChartToFile(DBChart1,SaveDialog1.FileName,DataCheckBox.Checked);
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
Problem with LoadChartFromFile
Hi again,
Im afraid I get the EClassNotFound (class TBarChart not found) exception, could it be something fundamental I´ve missed?
Regards,
Johan Ingemansson
Im afraid I get the EClassNotFound (class TBarChart not found) exception, could it be something fundamental I´ve missed?
Regards,
Johan Ingemansson
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Johan,
Ok, then the problem is about the units included. Before loading chart you have to register all series/tools classes you originally exported. This can be done by using RegisterTeeSeries(...) and RegisterTeeTool(...) routines. Or (much better and simpler solution) by including the TeeEditPRO unit to the import form Uses section. Including TeeEditPRO automatically registers all series/tool types.
Ok, then the problem is about the units included. Before loading chart you have to register all series/tools classes you originally exported. This can be done by using RegisterTeeSeries(...) and RegisterTeeTool(...) routines. Or (much better and simpler solution) by including the TeeEditPRO unit to the import form Uses section. Including TeeEditPRO automatically registers all series/tool types.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
Probem Fixed!!!
Hi,
Excellent, now it works, thx
Best Regards,
Johan Ingemansson
Excellent, now it works, thx
Best Regards,
Johan Ingemansson