Page 1 of 1

How to insert data to a ChartSeries

Posted: Sat Nov 04, 2006 10:09 am
by 9344308
Hi,

How could I insert data to a ChartSeries and then redraw it?
I would like to X, Y data, its color, and X-label to a line series.

Thanks in advance.

Seungho Jung

Posted: Mon Nov 06, 2006 2:22 pm
by narcis
Hi Seungho,

Just try using AddXY method of TLineSeries.

Re: How to insert data to a ChartSeries

Posted: Tue Nov 07, 2006 1:31 pm
by 9344308
Hi NarcĂ­s,

The AddXY method is append, not insert.
I would like to InsertXY( Insert_position_index, X, Y, X_label, Color ).
Is it possible?

Posted: Tue Nov 07, 2006 2:51 pm
by narcis
Hi Seungho,

Ok, then you may better set the XValues valuelist order to none before populating the series. This way series won't be drawn sequentially.

Code: Select all

  Series1.XValues.Order := loNone;
However if you really want to set the position index you can do it using this method:

Code: Select all

  Series1.SwapValueIndex(Index1,Index2);