Class SeriesSelectionBehavior
Enables the selection of individual or multiple series in a SfCartesianChart.
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public class SeriesSelectionBehavior : ChartSelectionBehavior
Remarks
To enable the series selection in the chart, create an instance of SeriesSelectionBehavior and set it to the SelectionBehavior
property of chart. To highlight the selected series, set the value for SelectionBrush property in SeriesSelectionBehavior.
It is applicable only for SfCartesianChart.
It provides the following options to customize the appearance of selected series:
Type - To select single or multiple series in a chart, refer to the Type property.
SelectionBrush - To highlight the selected series, refer to the SelectionBrush property.
SelectedIndex - To select a series programmatically, refer to the SelectedIndex property.
SelectedIndexes - To select multiple series programmatically, refer to the SelectedIndexes property.
Events - The SelectionChanging event occurs before the series is selected. The SelectionChanged event occurs after a series has been selected.
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.SelectionBehavior>
<chart:SeriesSelectionBehavior SelectionBrush ="Red" />
</chart:SfCartesianChart.SelectionBehavior>
<chart:LineSeries ItemsSource ="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1" />
<chart:LineSeries ItemsSource ="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue2" />
</chart:SfCartesianChart>
Constructors
SeriesSelectionBehavior()
Declaration
public SeriesSelectionBehavior()