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?
- Robert Evans asked 10 years ago
- You must login to post comments
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
Does this help?
Also, please see additional docs for legend templating here.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 10 years ago
-
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.
-
Awesome, glad you got a solution!
- You must login to post comments
Please login first to submit.