Page 1 of 1

Series Tagging

Posted: Mon Jan 17, 2005 12:55 pm
by 6928328
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

Posted: Tue Jan 18, 2005 12:40 am
by Pep
Hi Mark,

how about using the Series Title ?

Posted: Tue Jan 18, 2005 11:10 am
by 6928328
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.

Posted: Tue Feb 01, 2005 9:03 pm
by Pep
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