How can you determine which legend item has been clicked
How can you determine which legend item has been clicked
I have a legend on a chart with checkboxes. I have been looking through the ChartEvents but cant seem to find one that is fired when the checkbox for a series is changed, does such an event occur ?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi AR,
Yes, you can use OnClickLegend event and the legend clicked event to obtain the clicked item index as shown here:
Yes, you can use OnClickLegend event and the legend clicked event to obtain the clicked item index as shown here:
Code: Select all
Private Sub TChart1_OnClickLegend(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
TChart1.Header.Text.Clear
TChart1.Header.Text.Add (CStr(TChart1.Legend.Clicked(X, Y)))
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi AR,
I'm glad to hear that did what you needed. Clicked method can be used to retrieve series points index in events where screen coordinates are provided.
I'm glad to hear that did what you needed. Clicked method can be used to retrieve series points index in events where screen coordinates are provided.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |