SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

1
0

I have a chart with multiple dataseries, with each dataseries having annotations on top (like in the Trade Markers example). I have a legend which already shows or hides dataseries using a checkbox, but how can I make this checkbox also show or hide the annotations for that dataseries? Can I hook an event when this checkbox is triggered, or when the dataseries visibility changes?

  • You must to post comments
0
0

Hi Robert,

The Legend Checkbox is bound two way to RenderableSeries.IsVisible. We have a tutorial here which walks thorugh some extreme legend customization, including reacting to legend checkbox click and adding additional properties to the legend.

Tutorial – Custom Legend with Color Picker and Custom Point Markers

SciChart Legend Customization ControlTemplate

Does this help?

Also, please see additional docs for legend templating here.

Best regards,
Andrew

  • Robert Evans
    Thanks for the quick response Andrew.In the end I wrote a handler for the RenderableSeries.IsVisibleChanged event, which is called whenever the legend checkbox is clicked on. The handler sets the relevant annotations' "IsHidden" property to be the inverse of RenderableSeries.IsVisible.
  • Andrew
    Awesome, glad you got a solution!
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.