Hi Ranjithkumar caliaperoumal,
Greetings from Syncfusion.
Query 1: How to combine multiple line series to map under one legenditem?
You can enable one legend item by setting VisibilityOnLegend as Visible for primary series and collapsed the VisibilityOnLegend for other series and binding the first series visibility to other IsSeriesVisible property as per in the below code snippet.
Code Snippet [Xaml]:
<syncfusion:SfChart.Legend>
<syncfusion:ChartLegend CheckBoxVisibility="Visible" ToggleSeriesVisibility="True"/>
</syncfusion:SfChart.Legend>
<syncfusion:LineSeries x:Name="series1" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue" Label="Series1" VisibilityOnLegend="Visible" />
<syncfusion:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1" Label="Series2" VisibilityOnLegend="Collapsed" IsSeriesVisible="{Binding ElementName=series1, Path=IsSeriesVisible}"/>
<syncfusion:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue2" Label="Series3" VisibilityOnLegend="Collapsed" IsSeriesVisible="{Binding ElementName=series1, Path=IsSeriesVisible}"/> |
And we have prepared a sample based on your requirement and download the sample from below link.
Screenshot:
Thanks,
Lavanya A.