Page 1 of 1
Series Legend
Posted: Wed Jan 09, 2013 10:42 pm
by 16661060
Hi,
On a series legend:
- How do I change the text?
- How do I move the legends to the bottom of the graph?
- What can I keep the legend box to show the Points instead of the series name when there is only one series? (See image)
- 1.png (98.74 KiB) Viewed 5603 times
Re: Series Legend
Posted: Thu Jan 10, 2013 10:55 am
by 10050769
Hello n84_All,
- How do I change the text?
I think you can use OnGetLegend text to modify the items as you want as do in next lines of code:
Code: Select all
Private Sub TChart1_OnGetLegendText(ByVal LegendStyle As Long, ByVal ValueIndex As Long, LegendText As String)
If ValueIndex = 2 Then
LegendText = "Hello"
End If
End Sub
- How do I move the legends to the bottom of the graph?
To change position of Legend you must use the property Alignment as do in next line of code:
Code: Select all
TChart1.Legend.Alignment = laBottom
- What can I keep the legend box to show the Points instead of the series name when there is only one series? (See image)
To see the points you only need change the legend style as do in next line of code:
Code: Select all
TChart1.Legend.LegendStyle = lsValues
Also is possible achieve show the series points in legend if you have multiple series, You only need add a extra legend. You can find an example in TeeChartActivex Demo project
All features\Miscellaneous\Legend\Multiple Legends .
I hope will helps.
Thanks,