Save / Load chart settings

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
rackerson
Newbie
Newbie
Posts: 22
Joined: Mon Mar 08, 2004 5:00 am
Location: Edison, New Jersey USA

Save / Load chart settings

Post by rackerson » Mon Jan 29, 2007 5:39 pm

TeeChart 7.07 w/ Delphi 6

Does either TeeChart 7 or the upcoming TeeChart 8 provide an export AND import of the chart's settings to any file format? In looking at version 7 and playing with the version 8 beta a bit, I noticed the TeeSaveToXAMLFile and TeeSaveToVMLFile procedures but I could not see anything about LOADING these saved settings back into a TChart object.

In my company's application, we allow the users to "fine tune" the appearance of the chart to suite their needs, including changing series types of the data, colors, fonts, titles, background, etc... Pretty much any customizations TeeChart Pro supports, we offer to the user as well.

We have been asked to provide an unlimited UNDO and REDO feature that would respect each option we allow the user to change. What I was considering doing for this was exporting all of the chart's settings to an XML file (for example) whenever a setting was changed. Then, to "undo" a change, I would simply import the contents of a previously saved XML file, replacing my existing settings.

Is something like this available or would I need to roll my own export/import for this?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 30, 2007 9:40 am

Hi rackerson,

Yes, this is possible with TeeChart using its own template file format (.tee files). Tee files allow storing chart settings and data. You'll fine an example at this thread. You'll find further information about importing and exporting at Tutorial 12 - Exporting and Importing Charts. You'll find the tutorials at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

achristouio
Newbie
Newbie
Posts: 26
Joined: Tue Apr 02, 2002 5:00 am
Location: University of Oslo
Contact:

Post by achristouio » Tue Jan 30, 2007 11:01 am

narcis wrote:Hi rackerson,

Yes, this is possible with TeeChart using its own template file format (.tee files). Tee files allow storing chart settings and data. You'll fine an example at this thread. You'll find further information about importing and exporting at Tutorial 12 - Exporting and Importing Charts. You'll find the tutorials at TeeChart's program group.
Would it be possible to store just the settings and read these back again without the chart graphics.

I have an application where content of graphs are done dynamically, and would like to give users abilities of storing different setups of each plot type.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 30, 2007 11:31 am

Hi achristouio,

Yes, this is possible. Exporting to .tee file, SaveChartToFile method allows whether to include chart's data or not:

Code: Select all

procedure SaveChartToFile(AChart: TCustomChart; Const AFileName: String; IncludeData, TextFormat: Boolean);
For more information please read tutorial #12.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply