We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to change visibility of LegendItems of a chart (WinRT)

Hello SyncFusion-Team!

I have implemented a winrt-SfChart that displays several FastLineSeries. By clicking on buttons, specific lines can be made visible and hidden. It already works for the lines themselves, simply by setting the IsSeriesVisible-property to true or false, but i would also like to hide and show the corresponding LegendItems for the series. I tried setting the VisibilityOnLegend-property to collapsed, but unfortunately this does nothing. It seems as if this behavious can't be changed, after set once. For example if i add the series like this...

newFastLineSeries.VisibilityOnLegend = Windows.UI.Xaml.Visibility.Collapsed;
this.mySyncfusionChart.Series.Add(newFastLineSeries);

... it does not show on the legend, as excpected. But when i set the VisibilityOnLegend-property of the line to Visible later, it still does not appear on the legend. Is this behaviour intentional? Or am i just missing something? :)

Martin

2 Replies

MS Martin Scheibenreif January 15, 2014 04:16 PM UTC

Ok nevermind, i found a solution to my problem ;)


SB Shandhanu B Syncfusion Team January 16, 2014 09:17 AM UTC

Hi,

Sorry for delay in response, Thank you for contacting Syncfusion.
We are glad to here that you have solved the problem.

Thanks
Shandhanu B

Loader.
Live Chat Icon For mobile
Up arrow icon