Series Tagging

TeeChart for ActiveX, COM and ASP
Post Reply
mjwilliamson
Newbie
Newbie
Posts: 4
Joined: Mon May 05, 2003 4:00 am

Series Tagging

Post by mjwilliamson » Mon Jan 17, 2005 12:55 pm

Hi

I am trying to find a way of tagging a numeric value to a series without
adding a new point value. The reason is that for every series I have I need to know how long it took to get the statistics, so would like to associate a value with each series. The problem is that the series names and z-order can be changed via the editing interface so I cannot find a eliable way to map from series to values held elsewhere.

I had a look at the AddNullXY function but it seems that it displays the
value in the series depending on the type of series.

Does anyone know of a way around this?

Hope this is clear

Thanks in advance
Mark

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

Post by Pep » Tue Jan 18, 2005 12:40 am

Hi Mark,

how about using the Series Title ?

mjwilliamson
Newbie
Newbie
Posts: 4
Joined: Mon May 05, 2003 4:00 am

Post by mjwilliamson » Tue Jan 18, 2005 11:10 am

Hi, Thanks for the reply.

As I mentioned the series title can change (although you can prevent
the user from changing title, I would like to retain the functionality). Also this would force the user to have fixed series names.

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

Post by Pep » Tue Feb 01, 2005 9:03 pm

Hi,

in that case, the only way around I can think of is by using the AddNullXY method (as you said in your first post), adding XValue bigger than the maximum XValue and then set a Min/Max for the bottom axis using the SetMinMax method, similar to the following :

Code: Select all

Private Sub Form_Load()
With TChart1
    .AddSeries scLine
    .Series(0).FillSampleValues (5)
    .Axis.Bottom.SetMinMax 0, 4
    .Series(0).AddNullXY 50, Value, "Null"
End With
End Sub

Private Sub TChart1_OnGetLegendText(ByVal LegendStyle As Long, ByVal ValueIndex As Long, LegendText As String)
If TChart1.Series(0).IsNull(ValueIndex) Then
    LegendText = ""
End If
End Sub

Post Reply