How to insert data to a ChartSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Seungho Jung
Newbie
Newbie
Posts: 8
Joined: Fri Nov 25, 2005 12:00 am

How to insert data to a ChartSeries

Post by Seungho Jung » Sat Nov 04, 2006 10:09 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Nov 06, 2006 2:22 pm

Hi Seungho,

Just try using AddXY method of TLineSeries.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Seungho Jung
Newbie
Newbie
Posts: 8
Joined: Fri Nov 25, 2005 12:00 am

Re: How to insert data to a ChartSeries

Post by Seungho Jung » Tue Nov 07, 2006 1:31 pm

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?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Nov 07, 2006 2:51 pm

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);
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply