SelectionModel<D> class

Holds the state of interaction or selection for the chart to coordinate between various event sources and things that wish to act upon the selection state (highlight, drill, etc).

There is one instance per interaction type (ex: info, action) with each maintaining their own state. Info is typically used to update a hover/touch card while action is used in case of a secondary selection/action.

The series selection state is kept separate from datum selection state to allow more complex highlighting. For example: a Hovercard that shows entries for each datum for a given domain/time, but highlights the closest entry to match up with highlighting/bolding of the line and legend.

Implementers

Constructors

SelectionModel({List<SeriesDatum<D>>? selectedData, List<ImmutableSeries<D>>? selectedSeries})
Create selection model with the desired selection.
SelectionModel.fromConfig(List<SeriesDatumConfig<D>>? selectedDataConfig, List<String>? selectedSeriesConfig, List<ImmutableSeries<D>> seriesList)
Create selection model from configuration.
SelectionModel.fromOther(SelectionModel<D> other)
Create a deep copy of the selection model.

Properties

hasAnySelection bool
Returns true if this SelectionModel has a selected datum or series.
no setter
hasDatumSelection bool
Returns true if this SelectionModel has a selected datum.
no setter
hashCode int
The hash code for this object.
no setteroverride
hasSeriesSelection bool
Returns true if this SelectionModel has a selected series.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedDatum List<SeriesDatum<D>>
Returns the selected SeriesDatum for this SelectionModel.
no setter
selectedSeries List<ImmutableSeries<D>>
Returns the selected ImmutableSeries for this SelectionModel.
no setter

Methods

isDatumSelected(ImmutableSeries<D> series, int? index) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override