Hi Yeray,
I did some further tests and figure out the problem.
The series isn´t stored if you have dynamically generated Series.
Try the following:
- Add a chart to a form.
- Add a Region Tool to that chart
- Add a TFastLineSeries to the Chart and use this code:
Code: Select all
Chart2[0].FillSampleValues(100);
ChartTool2.Series := Chart2[0];
SaveChartToFile(Chart2, 'c:\test.tee', True, True);
The result will this:
Code: Select all
object ChartTool2: TSeriesRegionTool
Brush.BackColor = clWhite
Series = Series2
end
As you can see ... The series is added correctly.
Now delete the series from the chart and run this code:
Code: Select all
Chart2.AddSeries(TFastLineSeries);
Chart2[0].FillSampleValues(100);
ChartTool2.Series := Chart2[0];
SaveChartToFile(Chart2, 'c:\test.tee', True, True);
You will get this:
Code: Select all
object ChartTool2: TSeriesRegionTool
Brush.BackColor = clWhite
end
So what can I do to get the series stored in the Tee file (or the stream)?