Class
ChartSelectionBehavior

Represents a behavior that changes the IsSelected state of data points and series depending on user input.

Definition

Namespace:Telerik.UI.Xaml.Controls.Chart

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public class ChartSelectionBehavior : ChartBehavior

Inheritance: objectChartBehaviorChartSelectionBehavior

Inherited Members ChartBehavior.OnPointerEntered(PointerRoutedEventArgs)ChartBehavior.OnPointerMoved(PointerRoutedEventArgs)ChartBehavior.OnPointerExited(PointerRoutedEventArgs)ChartBehavior.OnPointerPressed(PointerRoutedEventArgs)ChartBehavior.OnHoldCompleted(HoldingRoutedEventArgs)ChartBehavior.OnHoldStarted(HoldingRoutedEventArgs)ChartBehavior.OnDoubleTapped(DoubleTappedRoutedEventArgs)ChartBehavior.OnManipulationStarted(ManipulationStartedRoutedEventArgs)ChartBehavior.OnManipulationDelta(ManipulationDeltaRoutedEventArgs)ChartBehavior.OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)ChartBehavior.OnPointerWheelChanged(PointerRoutedEventArgs)ChartBehavior.OnPointerReleased(PointerRoutedEventArgs)ChartBehavior.OnChartUIUpdated()ChartBehavior.GetDataContext(Point, bool)ChartBehavior.OnLoaded()ChartBehavior.OnUnloaded()ChartBehavior.OnAttached()ChartBehavior.OnDetached()ChartBehavior.ChartChartBehavior.AdornerLayer

Constructors

ChartSelectionBehavior()

Initializes a new instance of the ChartSelectionBehavior class.

Declaration

cs-api-definition
public ChartSelectionBehavior()

Properties

DataPointSelectionMode

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

Declaration

cs-api-definition
public ChartSelectionMode DataPointSelectionMode { get; set; }

Property Value

ChartSelectionMode

SelectedPoints

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

Declaration

cs-api-definition
public IEnumerable<DataPoint> SelectedPoints { get; }

Property Value

IEnumerable<DataPoint>

SelectedSeries

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

Declaration

cs-api-definition
public IEnumerable<ChartSeries> SelectedSeries { get; }

Property Value

IEnumerable<ChartSeries>

SeriesSelectionMode

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

Declaration

cs-api-definition
public ChartSelectionMode SeriesSelectionMode { get; set; }

Property Value

ChartSelectionMode

TouchTargetOverhang

Gets or sets the struct that will be used when calculating the touch rect.

Declaration

cs-api-definition
public Thickness TouchTargetOverhang { get; set; }

Property Value

Thickness

Methods

ClearSelection(bool, bool)

Removes the current selection within the chart.

Declaration

cs-api-definition
public void ClearSelection(bool dataPoints = true, bool chartSeries = true)

Parameters

dataPoints

bool

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

chartSeries

bool

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

OnTapped(TappedRoutedEventArgs)

Performs the core selection logic.

Declaration

cs-api-definition
protected override void OnTapped(TappedRoutedEventArgs args)

Parameters

args

TappedRoutedEventArgs

Overrides ChartBehavior.OnTapped(TappedRoutedEventArgs)

Events

SelectionChanged

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

Declaration

cs-api-definition
public event EventHandler SelectionChanged

Event Value

EventHandler