Page 1 of 1

Chart Saving and Loading problems.

Posted: Tue May 27, 2008 10:37 pm
by 10548832
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

Posted: Wed May 28, 2008 10:11 am
by narcis
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.