Page 1 of 1

Save / Load chart settings

Posted: Mon Jan 29, 2007 5:39 pm
by 9336044
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?

Posted: Tue Jan 30, 2007 9:40 am
by narcis
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.

Posted: Tue Jan 30, 2007 11:01 am
by 5891343
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.

Posted: Tue Jan 30, 2007 11:31 am
by narcis
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.