Chart Saving and Loading problems.

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Phineas
Newbie
Newbie
Posts: 18
Joined: Wed Apr 09, 2008 12:00 am

Chart Saving and Loading problems.

Post by Phineas » Tue May 27, 2008 10:37 pm

Using Delphi 6 and TeeChart 8 Pro

I have produced a financial chart containg two series. TCandleSeries and TVolume Series. The chart contains daily data for three years. It is scrollable. On the Chart I place a couple of trend Lines, TDrawLines, indicators, eg. MACD TLineSeries with a TMACDFunction. Moving Averages etc. The Chart has several ChartTools also.

Then I save the Chart to a file.

theStream := TFileStream.Create(SaveDialog1.FileName,fmCreate);
SaveChartToStream(ChartForm[fmIndex].MainChart, thestream, true, false);

And Load it again:

theStream := TFileStream.Create(OpenDialog1.FileName,fmOpenRead);
LoadChartFromStream(TCustomChart(ChartForm[fmIndex].MainChart),theStream);

When loading the saved chart: The chart appears with the trend lines in place and indicators etc.

However, nothing works on the chart. Series and tools are all (nil).

I have included TeeEditPRO in the uses clause. I have played around with RegisterClass but to no avail. I have tried to follow the myriad explanations here at the forum for this problem. Nothing works.

Is it possible to see a Delphi worked example of saving a chart, with series, tools etc included, and loading it again so as it works as it did when it was saved? Are there any working code examples to be seen anywhere?

Thanks for your help.
Grant

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

Post by Narcís » Wed May 28, 2008 10:11 am

Hi Grant,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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