Jump to content
Software FX Community

Hightlight series across multiple pane using 'HighlightItem'


Recommended Posts


 I have a chart that has multiple panes. Since the legend for the data between the panes can be common we are using 'UserLegendBox' (Series Legend box repeats the common ones). But the proble with the 'UserLegendBox' is that it is independent of the data that is shown in the charts and hence when we move the mouse over the legend it does not highlight the corresponding series/bar/line in the chart.

We have written code in the 'Highlighted' event of the chart control to highlight the all the series corresponding to the highlighted legend using the 'HighlightItem' in a for loop. But only one series gets highlighted. Am I missing something here. Is it possible to highlight multiple series across multiple pane. Here is the code...


If (TypeOf objMouseEventArgsX.Object Is SoftwareFX.ChartFX.UserLegendBox) Then

 'Get the name of the legend that is highlighted

 objUserLegendBox = DirectCast(objMouseEventArgsX.Object, SoftwareFX.ChartFX.UserLegendBox)

  strLegendName = objUserLegendBox.Item(objMouseEventArgsX.Point).Label

 'Highlight all the series that match the highlighted legend

 For intSeriesLegIndex As Integer = 0 To Series.Count

  If (SerLeg(intSeriesLegIndex) = strLegendName) Then

objHighlightEventArgs = New SoftwareFX.ChartFX.Base.HighlightEventArgs

With objHighlightEventArgs

.Series = intSeriesLegIndex

.Mode = Base.HighlightModes.Series

End With

Highlight.HighlightItem(Me, objHighlightEventArgs)


  End If

 Next intSeriesLegIndex


End If




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...