Skip to main content

IIndexSelectableChart Interface

Definition​

Assembly:Avalonia.Controls.Charts
Package:Avalonia.Controls.Charts

Selection contract for chart components that select data points by index.

public interface IIndexSelectableChart
Implements:ISelectableChart

Methods​

NameDescription
IsDataPointSelectedChecks if the data point at the given index is currently selected.
TrySelectDataPointAttempts to select a data point at the given index.

IsDataPointSelected Method​

Checks if the data point at the given index is currently selected.

public bool IsDataPointSelected(int index)

Parameters​

index int

The index to check.

Returns​

bool

True if selected.

TrySelectDataPoint Method​

Attempts to select a data point at the given index.

public bool TrySelectDataPoint(int index)

Parameters​

index int

The index of the data point.

Returns​

bool

True if the selection state changed.

Properties​

NameDescription
SelectedIndexGets the index of the currently selected data point (-1 if none).
SelectedIndexesGets the collection of all currently selected indexes.

SelectedIndex Property​

Gets the index of the currently selected data point (-1 if none).

public int SelectedIndex { get; set; }

SelectedIndexes Property​

Gets the collection of all currently selected indexes.

public System.Collections.Generic.IReadOnlyCollection<int> SelectedIndexes { get; set; }