how to change from bar to line or others

TeeChart for ActiveX, COM and ASP
Post Reply
abing
Newbie
Newbie
Posts: 24
Joined: Thu Feb 07, 2002 5:00 am

how to change from bar to line or others

Post by abing » Mon May 31, 2004 6:28 am

I use the teechart in a real-time system. per-second i put a data into a series. But later,i will chang the series' shape,for example from bar to line or to point.
how can i do it .

Thank you! Best Wishes!

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

Post by Pep » Mon May 31, 2004 8:17 am

Hi,

not all the Series type can be changed dinamically. This depends on which type of values are stored in the Series. For example Arrow Series and Shape series, specifically, require values of type (X0,Y0) and (X1,Y1) whereas a BarJoin series only requires (X,Y) so this could not be changed. To change to a Series type which uses the same types of values you can do :

Code: Select all

Private Sub Command1_Click()
  TChart1.ChangeSeriesType 0, scBar
End Sub

Private Sub Form_Load()
With TChart1
    .AddSeries scLine
    .Series(0).FillSampleValues (10)
End With
End Sub

abing
Newbie
Newbie
Posts: 24
Joined: Thu Feb 07, 2002 5:00 am

Post by abing » Mon May 31, 2004 11:41 am

This does well. Thank you very very much . 非常感谢!

Post Reply