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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Legend checkbox disable

Thread ID:

Created:

Updated:

Platform:

Replies:

127665 Dec 1,2016 11:42 AM UTC Dec 5,2016 11:17 AM UTC WPF 3
loading
Tags: SfChart
Salva
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" >
                                <chart:SfChart.Header>
                                    <TextBlock FontSize="14" Text="Días Apertura Campanya" Margin="10" />
                                </chart:SfChart.Header>
                                <chart:SfChart.PrimaryAxis>
                                    <chart:CategoryAxis Header="Días" FontSize="14" LabelFormat="dd/MM/yy" LabelRotationAngle="45" />
                                </chart:SfChart.PrimaryAxis>
                                <chart:SfChart.SecondaryAxis>
                                    <chart:NumericalAxis Header="Aperturas" FontSize="14" Minimum="0" />
                                </chart:SfChart.SecondaryAxis>
                                <chart:SfChart.Legend>
                                    <chart:ChartLegend CheckBoxVisibility="Visible"   />
                                </chart:SfChart.Legend>
                                <chart:LineSeries 
                                    ItemsSource="{Binding Path=DatosAperturasDias}" 
                                    XBindingPath="Key" YBindingPath="Value"
                                    ShowTooltip="True"  Interior="Gold"  
                                    ShowEmptyPoints="True"  EmptyPointValue="Zero"
                                    Label="Aperturas"
                                    VisibilityOnLegend="Visible" Visibility="Visible"
                                    >
                                </chart:LineSeries>
                                <chart:LineSeries 
                                    ItemsSource="{Binding Path=DatosBajasDias}" 
                                    XBindingPath="Key" YBindingPath="Value"
                                    ShowTooltip="True"  Interior="Green"         
                                    ShowEmptyPoints="True"  EmptyPointValue="Zero"
                                    Label="Bajas"
                                    VisibilityOnLegend="Visible" Visibility="Collapsed"                                    
                                    >
                                </chart:LineSeries>
                            </chart:SfChart>




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, 
  
  
Regards, 
Devi 
 





Salva
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. 
  
Regards, 
Devi 

  


CONFIRMATION

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.

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

;