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

Legend checkbox disable

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"                                    

3 Replies

DA Devi Aruna Maharasi Murugan Syncfusion Team 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, 

SA Salva December 2, 2016 03:12 PM UTC

Hi Devi.

Thanks, it's perfect, 

DA Devi Aruna Maharasi Murugan Syncfusion Team December 5, 2016 11:17 AM UTC

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


Live Chat Icon For mobile
Up arrow icon