hi
when saving a chart to stream im using the following code:
SaveChartToStream(Chart1,strm,TRUE,TRUE);
strm : TMemoryStream;
when loading it back im using the following code:
LoadChartFromStream(TCustomChart(Chart1),strm);
i have to typecast to TCustomChart or else it wont compile
when the code is executed i get the attached error.
the error is internal and is visible only when running in debug mode, running it from outside of delphi nothing is shown to the user.
anyway, the loading is successful as if nothing happened
please advice
problem loading chart from stream
problem loading chart from stream
- Attachments
-
- err.JPG (17.74 KiB) Viewed 3351 times
Re: problem loading chart from stream
Hi Nati,
The following example seems to work fine here:
Could you please modify it or attach here a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
The following example seems to work fine here:
Code: Select all
uses teestore, series;
procedure TForm1.Button1Click(Sender: TObject);
begin
SaveChartToStream(Chart1,strm,TRUE,TRUE);
Chart1.RemoveAllSeries;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
strm.Position := 0;
LoadChartFromStream(TCustomChart(Chart1),strm);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
strm := TMemoryStream.Create;
Chart1.AddSeries(TPointSeries.Create(self));
Chart1[0].FillSampleValues(25);
end;
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |