AddXY at the beginning of the series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

AddXY at the beginning of the series

Post by bertrod » Mon Aug 21, 2006 1:44 pm

Hello,

I would like to add points at the beginning of a TFastLineSeries (index 0). Notice that my series must be with a "loNone" order.

My goal is to do it as fast as possible. Is there a quick way to do it using some specific TeeChart methods ?

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Aug 22, 2006 11:09 am

Hi Bertrod,

you have two options :
1) if you want to add points before the 0 index, having negative XValues you can do :
Series1.AddXY(Series1.XValues.MinValue-1,random(100));
2) If you want that the added point always have the index as 0, then the next xvalues will have to be moved, in that case you can use :
for i := 0 to Series1.Count-1 do
Series1.XValue:=Series1.XValue+1;
Series1.AddXY(0,random(100));

Post Reply