I use SaveChartToStream to store a Chart to a stream Well done sentence
Ok now I want to save this Stream to a file. This could be done by
Code: Select all
<STREAM>.SaveToFile(FileName);
I loaded the stored stream into TeeChart Office and it works.
There is also no problem to convert such a stream file with "ConvertTeeFileToText" to a Tee Text file.
So what do you say about this? Is this practicable? Normally I use this code to store the chart within a Thread:
Code: Select all
ChartStream.Position := 0;
LoadChartFromStream(TCustomChart(ChartCopy), ChartStream);
ChartStream.Free;
SaveChartToFile(TCustomChart(ChartCopy),
FileName,
True, // Include Data
False); // Text Format ?
ChartCopy.Free;
If I use the workaround from above I save 1/3 of memory consumption.