Is there a way to save the specification of a chart (Datasource, series, Titles etc) rather than the whole chart?
many thanks
Saving Chart Specification 5.02/Delphi 6
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi tcardinal,
First of all, please notice that TeeChart native files (.tee) don't save series datasources. Having that in mind, you may export series styles (line, bar, points, etc.), data and titles using XML exporting.
Also notice that .tee files only store those settings which have been changed in a default chart so no much data is stored on them.
First of all, please notice that TeeChart native files (.tee) don't save series datasources. Having that in mind, you may export series styles (line, bar, points, etc.), data and titles using XML exporting.
Also notice that .tee files only store those settings which have been changed in a default chart so no much data is stored on them.
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 |
Many thanks Narcís
I have found the SaveToStream and LoadFromStream in the TeeStore unit.
However, I need to save these to an XML document but the .tee format contains characters not allowed in XML. As a result I get an error when I try to write to my XML document.
Is there another format I can save to? If so where would I find the function?
many thanks
I have found the SaveToStream and LoadFromStream in the TeeStore unit.
However, I need to save these to an XML document but the .tee format contains characters not allowed in XML. As a result I get an error when I try to write to my XML document.
Is there another format I can save to? If so where would I find the function?
many thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi tcardinal,
To store a TeeChart into a XML file you need to do something like this:
To store a TeeChart into a XML file you need to do something like this:
Code: Select all
Procedure TExportXMLForm.ShowSavedFile;
begin
GoToURL(Handle,SaveDialog1.FileName);
end;
procedure TExportXMLForm.Button1Click(Sender: TObject);
begin
if SaveDialog1.Execute then
begin
{ nil = all series in Chart1 }
with TSeriesDataXML.Create(Chart1,nil) do
try
IncludeIndex:=CheckBox1.Checked;
SaveToFile(SaveDialog1.FileName);
ShowSavedFile;
finally
Free;
end;
end;
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 |