Hello,
My apologies if I'm missing the obvious, but how do I go about setting legend items explicitly (in a pie graph) without affecting the point labels? In my pie graph, I want the pie slices to be labeled with text, but the legend items to use a different custom string.
Thanks for any assistance!
- Mark R.
Setting legend items explicitly
Hi,
you can use the OnGetLegendText event to set your custom text :
you can use the OnGetLegendText event to set your custom text :
Code: Select all
Private Sub Form_Load()
With TChart1
.AddSeries scPie
.Series(0).FillSampleValues (5)
End With
End Sub
Private Sub TChart1_OnGetLegendText(ByVal LegendStyle As Long, ByVal ValueIndex As Long, LegendText As String)
If ValueIndex = 0 Then
LegendText = "My custom text"
End If
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com