New to Telerik UI for .NET MAUIStart a free 30-day trial

Represents a behavior that handles selection of chart series and data points.

Definition

Namespace:Telerik.Maui.Controls.Compatibility.Chart

Assembly:Telerik.Maui.Controls.Compatibility.dll

Syntax:

C#
public class ChartSelectionBehavior : ChartBehavior

Inheritance: objectChartElementChartBehaviorChartSelectionBehavior

Inherited Members ChartElement.OnPropertyChanged(string)ChartElement.Key

Constructors

C#
public ChartSelectionBehavior()

Fields

CommandParameterProperty

BindableProperty

Identifies the CommandParameter property.

C#
public static readonly BindableProperty CommandParameterProperty

CommandProperty

BindableProperty

Identifies the Command property.

C#
public static readonly BindableProperty CommandProperty

Identifies the DataPointSelectionMode property.

C#
public static readonly BindableProperty DataPointSelectionModeProperty

Identifies the SeriesSelectionMode property.

C#
public static readonly BindableProperty SeriesSelectionModeProperty

Properties

Gets or sets the Command that is invoked when selection changes.

C#
public ICommand Command { get; set; }

Gets or sets the CommandParameter that is passed to the Command property. The ChartSelectionBehavior instance is the default parameter.

C#
public object CommandParameter { get; set; }

Gets or sets the ChartSelectionMode that controls the selection behavior of the data points within the chart series.

C#
public ChartSelectionMode DataPointSelectionMode { get; set; }

Gets all the points from all series within the chart plot area that are currently selected.

C#
public IEnumerable<DataPoint> SelectedPoints { get; }

Gets all the ChartSeries instances within the plot area that are currently selected.

C#
public IEnumerable<ChartSeries> SelectedSeries { get; }

Gets or sets the ChartSelectionMode that controls the selection behavior of the chart series.

C#
public ChartSelectionMode SeriesSelectionMode { get; set; }

Methods

Removes the current selection within the chart.

C#
public void ClearSelection(bool dataPoints = true, bool chartSeries = true)
Parameters:dataPointsbool

True to clear the selected state of each data point, false otherwise.

chartSeriesbool

True to clear the selected state of each chart series, false otherwise.

Raises the SelectionChanged event.

C#
public void OnSelectionChanged()

Events

Occurs when the IsSelected property of a ChartSeries and/or DataPoint instance changes.

C#
public event EventHandler SelectionChanged