Legend-click event
Posted: Wed Feb 25, 2009 6:04 am
I capture legendclick event of a chart and display legend editor to the user with the following code. I like to capture what color user has chosen in the editor for the series after the PenEditor is displayed to the user. How can i get the color chosen by the user from the PenEditor.
Code: Select all
Private Sub MyChart_ClickLegend(ByVal sender As Object, ByVal e As MouseEventArgs)
Dim MyChart As Steema.TeeChart.Chart = CType(sender, Steema.TeeChart.Chart)
Dim Index As Integer = MyChart.Legend.Clicked(e.X, e.Y)
Dim Series As Steema.TeeChart.Styles.FastLine
If ((Index <> -1) And (MyChart.Series.Count >= Index)) Then
Series = CType(MyChart.Series(Index), Steema.TeeChart.Styles.FastLine)
Steema.TeeChart.Editors.PenEditor.Edit(Series.LinePen)
'Series.Color = Series.LinePen.Color
End If
End Sub