Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1493
CheckBox in legend...
posted

Hi,

        I am trying to have a check box in legend against each series and on uncheck I want my series hidden. Is it possible or not please suggest a solution thanks.

 

Parents
No Data
Reply
  • 8421
    Suggested Answer
    posted

    Hello,

    This can be accomplished by retemplating a series' LegendItemTemplate to contain a check box. Once you have this, you can then bind the check box's IsChecked property to the Series.Visibility property. Please note, however, that you'll also have to implement a value converter that can convert from the Visibility enumeration to a boolean value.

    I have attached a small sample that demonstrates how all of this can be accomplished. Please let me know if you have any further questions or concerns about this matter.

    XamDataChartLegendStyling.zip
Children