SelectionBehavior class
Provides options for the selection of series or data points.
By using this class, The color and width of the selected and unselected series or data points can be customized.
Constructors
- SelectionBehavior({bool enable = false, Color? selectedColor, Color? selectedBorderColor, double? selectedBorderWidth, Color? unselectedColor, Color? unselectedBorderColor, double? unselectedBorderWidth, double selectedOpacity = 1.0, double unselectedOpacity = 0.5, RangeController? selectionController, bool toggleSelection = true})
- Creating an argument constructor of SelectionBehavior class.
Properties
- enable → bool
-
Enables or disables the selection.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- parentBox ↔ RenderBox?
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedBorderColor → Color?
-
Border color of the selected data points or series.
final
- selectedBorderWidth → double?
-
Border width of the selected data points or series.
final
- selectedColor → Color?
-
Color of the selected data points or series.
final
- selectedOpacity → double
-
Opacity of the selected series or data point.
final
- selectionController → RangeController?
-
Controller used to set the maximum and minimum values for the chart.
By providing the selection controller, the maximum and
The minimum range of selected series or points can be customized.
final
- toggleSelection → bool
-
Decides whether to deselect the selected item or not.
final
- unselectedBorderColor → Color?
-
Border color of the unselected data points or series.
final
- unselectedBorderWidth → double?
-
Border width of the unselected data points or series.
final
- unselectedColor → Color?
-
Color of the unselected data points or series.
final
- unselectedOpacity → double
-
Opacity of the unselected series or data point.
final
Methods
-
copyWith(
{bool? enable, Color? selectedColor, Color? unselectedColor, Color? selectedBorderColor, Color? unselectedBorderColor, double? selectedBorderWidth, double? unselectedBorderWidth, double? selectedOpacity, double? unselectedOpacity, bool? toggleSelection}) → SelectionBehavior -
getSelectedDataPoints(
CartesianSeries series) → List< int> - Provides the list of selected point indices for given series.
-
handleDoubleTap(
Offset position) → void -
Called when pointer tap has contacted the screen double time.
inherited
-
handleEvent(
PointerEvent event, BoxHitTestEntry entry) → void -
To customize the necessary pointer events in behaviors.
(e.g., CrosshairBehavior, TrackballBehavior, ZoomingBehavior).
inherited
-
handleLongPressEnd(
LongPressEndDetails details) → void -
Called when the pointer stops contacting the screen after a long-press by
a primary button in behavior.
inherited
-
handleLongPressMoveUpdate(
LongPressMoveUpdateDetails details) → void -
Called when moving after the long press gesture by a primary button
is recognized in behavior.
inherited
-
handleLongPressStart(
LongPressStartDetails details) → void -
Called when a long press gesture by a primary button has been
recognized in behavior.
inherited
-
handlePointerEnter(
PointerEnterEvent details) → void -
Called when a pointer or mouse enter on the screen.
inherited
-
handlePointerExit(
PointerExitEvent details) → void -
Called when a pointer or mouse exit on the screen.
inherited
-
handleScaleEnd(
ScaleEndDetails details) → void -
Called when the pointers are no longer in contact with the screen.
inherited
-
handleScaleStart(
ScaleStartDetails details) → void -
Called when the pointers in contact with the screen
and initial scale of 1.0.
inherited
-
handleScaleUpdate(
ScaleUpdateDetails details) → void -
Called when the pointers in contact with the screen have indicated
a new scale.
inherited
-
handleTapDown(
TapDownDetails details) → void -
Called when the pointer tap has contacted the screen in behavior.
inherited
-
handleTapUp(
TapUpDetails details) → void -
Called when pointer has stopped contacting screen in behavior.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPaint(
PaintingContext context, Offset offset, SfChartThemeData chartThemeData, ThemeData themeData) → void -
Called to customize each behaviors with given context at the given offset.
inherited
-
selectDataPoints(
int pointIndex, [int seriesIndex = 0]) → void - Selects or deselects the specified data point in the series.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited