Page 1 of 1

Keeping a graph line the same when adding points?

Posted: Wed Dec 10, 2008 12:07 pm
by 9239148
Hi Support,

I think I saw a thread on this a few months ago but I can't find it - if it's still around here somewhere then please point me in the right direction :)

I have a system that adds points using X and Y values to a chart at regular intervals. As each point is added, a line must be drawn from the previous point to the current one, without changing the previous lines that have been drawn.

Image

In the above example, Graph A represents the desired behaviour. Graph B is what happens when I try to use a TLineSeries and add the points using the .ADDXY method.

Is there a series (or chart) type that is designed to do this?

Thanks,
Monkey.

Posted: Wed Dec 10, 2008 12:12 pm
by narcis
Hi Monkey,

That's because, by default, X values are sorted ascendingly as line series are designed for plotting sequential data. To achieve what you request you can set x values order to none before populating your series:

Code: Select all

  Series1.XValues.Order:=loNone;
Hope this helps!

Posted: Wed Dec 10, 2008 1:06 pm
by 9239148
Hi NarcĂ­s,

That does the trick!

Thanks,
Monkey.

Posted: Wed Dec 17, 2008 6:56 am
by 8574101
Thanks :D