Hi,
I have added so many points to a series by calling AddXY that EOutOfMemory is raised whenever I'm calling AddXY again. Now, I want to remove every second point of the chart (i.e. reduce the number of samples) to free some memory. How can I do that?
Regards,
S.
How can I remove points from TChartSeries
Re: How can I remove points from TChartSeries
Hi susi,
Is the following what you are trying to do?
Is the following what you are trying to do?
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var i: Integer;
begin
i:=1;
while (i < Series1.Count-1) do
begin
Series1.Delete(i);
i:=i+1;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: How can I remove points from TChartSeries
Yes, but the software hangs when I do that with a chart that is so big that it raised the EOutOfMemory exception.
Re: How can I remove points from TChartSeries
Hi susi,
If the problem is with the drawing of the big amount of points, you could try with the DownSampling function (see the demo at All features\Welcome !\Functions\Extended\Reducing number of points)
If the problem is with the memory, as it seems to be, there isn't too much TeeChart can do for you. It depends on the machine capacity and the number of values you are loading into memory. Here the better option would be to add some control of the points before being added.
If you still have problems with it, please send us a simple example project we can run as-is to reproduce the problem here.
If the problem is with the drawing of the big amount of points, you could try with the DownSampling function (see the demo at All features\Welcome !\Functions\Extended\Reducing number of points)
If the problem is with the memory, as it seems to be, there isn't too much TeeChart can do for you. It depends on the machine capacity and the number of values you are loading into memory. Here the better option would be to add some control of the points before being added.
If you still have problems with it, please send us a simple example project we can run as-is to reproduce the problem here.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |