SelectNearest<D> class
Chart behavior that listens to the given eventTrigger and updates the specified SelectionModel. This is used to pair input events to behaviors that listen to selection changes.
Input event types: hover (default) - Mouse over/near data. tap - Mouse/Touch on/near data. pressHold - Mouse/Touch and drag across the data instead of panning. longPressHold - Mouse/Touch for a while in one place then drag across the data.
SelectionModels that can be updated: info - To view the details of the selected items (ie: hover for web). action - To select an item as an input, drill, or other selection.
Other options available selectionMode - Optional mode for expanding the selection beyond the nearest datum. Defaults to expandToDomain. selectClosestSeries - mark the series for the closest data point as selected. (Default: true)
You can add one SelectNearest for each model type that you are updating. Any previous SelectNearest behavior for that selection model will be removed.
- Inheritance
-
- Object
- ChartBehavior<
D> - SelectNearest
- Annotations
Constructors
- SelectNearest({SelectionModelType selectionModelType = common.SelectionModelType.info, SelectionMode selectionMode = common.SelectionMode.expandToDomain, bool selectAcrossAllDrawAreaComponents = false, bool selectClosestSeries = true, SelectionTrigger eventTrigger = common.SelectionTrigger.tap, int? maximumDomainDistancePx})
-
factory
Properties
-
desiredGestures
→ Set<
GestureType> -
final
- eventTrigger → SelectionTrigger
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- maximumDomainDistancePx → int?
-
final
- role → String
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectAcrossAllDrawAreaComponents → bool
-
final
- selectClosestSeries → bool
-
final
- selectionMode → SelectionMode
-
final
- selectionModelType → SelectionModelType
-
final
Methods
-
createCommonBehavior(
) → SelectNearest< D> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateCommonBehavior(
ChartBehavior commonBehavior) → void -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override