Class ChartSelectionBehavior
ChartSelectionBehavior enables the selection of individual segment in a series or chart series itself.
Inherited Members
Namespace: Syncfusion.SfChart.XForms
Assembly: Syncfusion.SfChart.XForms.dll
Syntax
public class ChartSelectionBehavior : ChartBehavior, IThemeElement
Remarks
The selected segment can be displayed with a different color specified using SelectedDataPointColor property available in corresponding series. ChartSelectionBehavior is applicable only to certain series such as ColumnSeries, BarSeries, RangeColumnSeries, StackingBarSeries, StackingColumnSeries, ScatterSeries, BubbleSeries, PieSeries, DoughnutSeries.
Examples
SfChart chart = new SfChart();
ChartSelectionBehavior selection = new ChartSelectionBehavior();
chart.ChartBehaviors.Add(selection);
Constructors
ChartSelectionBehavior()
Declaration
public ChartSelectionBehavior()
Methods
OnSelectionChanged(ChartSelectionEventArgs)
Raised after the current selection changes in ChartSegment.
Declaration
protected virtual void OnSelectionChanged(ChartSelectionEventArgs arg)
Parameters
Type | Name | Description |
---|---|---|
ChartSelectionEventArgs | arg | event args value. |
OnSelectionChanging(ChartSelectionChangingEventArgs)
Raised just before the current selection changes in ChartSegment.
Declaration
protected virtual void OnSelectionChanging(ChartSelectionChangingEventArgs arg)
Parameters
Type | Name | Description |
---|---|---|
ChartSelectionChangingEventArgs | arg | event args value. |