Page 1 of 1

how to change from bar to line or others

Posted: Mon May 31, 2004 6:28 am
by 6924221
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!

Posted: Mon May 31, 2004 8:17 am
by Pep
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

Posted: Mon May 31, 2004 11:41 am
by 6924221
This does well. Thank you very very much . 非常感谢!