Chart FIFO

Is there any way to have a FIFO behaviour in a LineChart? I want to delete the first point of the diagram and add another point. I tried the following:

(Chart 3 is the TChart and Std_dm is the TLineSeries. DataPoints is my "max" of desired data points in the diagram)

  if Std_dm.count > DataPoints then
  begin
    Std_dm.delete(0);
    Chart3.Update;
  end;
  Std_dm.Add(Value);



When I do this the following happens: http://www.dropbox.com/s/dht0tz4ycnpbob4/Charts.PNG?dl=0
It deletes with every run the first point and adds every new value at the Index "DataPoints".
A workaround is to clear the diagram and add a complete array. But this seems a little bit sloppy.

Best regards

If you are returning your points through the virtual method GetPoint and GetNumberOfPoints, then you need to wrap the code that removes a point with BeginUpdate / EndUpdate.


Kind Regards, 
Pieter