Hi,
I want to add new X,Y points at the end of a serie. So I tried the function AddXY() ..... but it does not work correctly because this function insert points and not add points at the end of the serie.
Is there a function which I could used to do it simply ?
Thanks!
Franck
Add point at the end of the serie
Add point at the end of the serie
franckgar
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Franck,
Yes, you can use Series.Add(...). This method inserts new Series points when you do not have an X Value for the point. The new point added with the Add method only has Y values. The X values are automatically calculated (sequential index of 0,1,2,3,4..etc).
Yes, you can use Series.Add(...). This method inserts new Series points when you do not have an X Value for the point. The new point added with the Add method only has Y values. The X values are automatically calculated (sequential index of 0,1,2,3,4..etc).
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
I'd use AddXY method to add point with specific (x,y) coordinate. The AddXY method does *not* insert a point in the chartlist(s) arrays, but it adds it to the end of the array. But if your newly added point x value is smaller than maximum x value then the end result (on screen) will be your newly added point won't be connected to it's predecessor. To fix this problem (override default behavoir), all you must do is set series XValues.Order property to loNone *before* you start adding points to series. In this case the points will be connected in the same order as they are added to series:I can't use the function Series.Add(...) because I must add points with X and Y defined by a previous function. Is there any other solution ?
Code: Select all
// draw parametric plot
Series1.XValues.Order := loNone;
Series1.AddXY(2,3);
Series1.AddXY(1,5);
Series1.AddXY(2.3,3);
Series1.AddXY(2.2,-1);
Marjan Slatinek,
http://www.steema.com
http://www.steema.com