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 selecting just the nearest datum.
selectAcrossAllSeriesRendererComponents - Events in any component that draw Series data will propagate to other components that draw Series data to get a union of points that match across all series renderer components. This is useful when components in the margins draw series data and a selection is supposed to bridge the two adjacent components. (Default: true) selectClosestSeries - If true, the closest Series itself will be marked as selected in addition to the datum. This is useful for features like highlighting the closest Series. (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.
- Implemented types
Constructors
- SelectNearest({SelectionModelType selectionModelType = SelectionModelType.info, SelectionMode selectionMode = SelectionMode.expandToDomain, bool selectAcrossAllSeriesRendererComponents = true, bool selectClosestSeries = true, SelectionTrigger eventTrigger = SelectionTrigger.hover, int? maximumDomainDistancePx, int? hoverEventDelay})
Properties
- eventTrigger → SelectionTrigger
-
Type of input event that should trigger selection.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoverEventDelay → int?
-
Wait time in milliseconds for when the next event can be called.
final
- maximumDomainDistancePx → int?
-
The farthest away a domain value can be from the mouse position on the
domain axis before we'll ignore the datum.
final
- role → String
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectAcrossAllSeriesRendererComponents → bool
-
Whether or not events in any component that draw Series data will
propagate to other components that draw Series data to get a union of
points that match across all series renderer components.
final
- selectClosestSeries → bool
-
Whether or not the closest Series itself will be marked as selected in
addition to the datum.
final
- selectionMode → SelectionMode
-
Optional mode for expanding the selection beyond the nearest datum.
Defaults to selecting just the nearest datum.
final
- selectionModelType → SelectionModelType
-
Type of selection model that should be updated by input events.
final
Methods
-
attachTo(
BaseChart< D> chart) → void -
Injects the behavior into a chart.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFrom(
BaseChart< D> chart) → void -
Removes the behavior from a chart.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited