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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Legend checkbox disable

Thread ID:





127665 Dec 1,2016 11:42 AM UTC Dec 5,2016 11:17 AM UTC WPF 3
Tags: SfChart
Asked On December 1, 2016 11:42 AM UTC

I have a Chart that have two LineSeries. The first serie(aperturas) is Visibility="Visible" and the second(bajas) is Visibility="Collapsed". when the chart is showed, the first is visible and second is collapsed, it is Ok, but in the legend, I have two Chechkbox and the two checkbox are checked. it is a problem, because in the chart only is showed one serie and to show the second serie, I have to check checkbox to descheck and check again to show the content.

<chart:SfChart Grid.Row="3" >
                                    <TextBlock FontSize="14" Text="Días Apertura Campanya" Margin="10" />
                                    <chart:CategoryAxis Header="Días" FontSize="14" LabelFormat="dd/MM/yy" LabelRotationAngle="45" />
                                    <chart:NumericalAxis Header="Aperturas" FontSize="14" Minimum="0" />
                                    <chart:ChartLegend CheckBoxVisibility="Visible"   />
                                    ItemsSource="{Binding Path=DatosAperturasDias}" 
                                    XBindingPath="Key" YBindingPath="Value"
                                    ShowTooltip="True"  Interior="Gold"  
                                    ShowEmptyPoints="True"  EmptyPointValue="Zero"
                                    VisibilityOnLegend="Visible" Visibility="Visible"
                                    ItemsSource="{Binding Path=DatosBajasDias}" 
                                    XBindingPath="Key" YBindingPath="Value"
                                    ShowTooltip="True"  Interior="Green"         
                                    ShowEmptyPoints="True"  EmptyPointValue="Zero"
                                    VisibilityOnLegend="Visible" Visibility="Collapsed"                                    

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 2, 2016 11:34 AM UTC

Hi Salva, 
Thanks for contacting Syncfusion Support. 
We have analyzed the reported query and you can achieve your requirement by using IsSeriesVisible property of series rather than Visibility property as shown in the below code snippet, 
<chart:LineSeries IsSeriesVisible="True"> 
We have prepared a demo sample based on your requirement with the reference of the provided code snippet and it can be downloaded from below link, 

Replied On December 2, 2016 03:12 PM UTC

Hi Devi.

Thanks, it's perfect, 

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 5, 2016 11:17 AM UTC

Hi Salva, 
Thanks for your update. 
Please let us know, if you need any further assistance. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon