TrackballBehavior class
Customizes the trackball.
Trackball feature displays the tooltip for the data points that are closer to the point where you touch on the chart area. This feature can be enabled using enable property of TrackballBehavior.
Provides options to customize the activationMode, tooltipDisplayMode, lineType and tooltipSettings.
- Annotations
Constructors
-
TrackballBehavior({ActivationMode activationMode = ActivationMode.longPress, TrackballLineType lineType = TrackballLineType.vertical, TrackballDisplayMode tooltipDisplayMode = TrackballDisplayMode.floatAllPoints, ChartAlignment tooltipAlignment = ChartAlignment.center, InteractiveTooltip tooltipSettings = const InteractiveTooltip(), TrackballMarkerSettings? markerSettings, List<
double> ? lineDashArray, bool enable = false, Color? lineColor, double lineWidth = 1, bool shouldAlwaysShow = false, ChartTrackballBuilder? builder, double hideDelay = 0}) - Creating an argument constructor of TrackballBehavior class.
Properties
- activationMode → ActivationMode
-
Gesture for activating the trackball.
final
- builder → ChartTrackballBuilder?
-
Builder of the trackball tooltip.
final
-
chartPointInfo
↔ List<
ChartPointInfo> -
getter/setter pair
- enable → bool
-
Toggles the visibility of the trackball.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hideDelay → double
-
Giving disappear delay for trackball.
final
- lineColor → Color?
-
Color of the track line.
final
-
lineDashArray
→ List<
double> ? -
Dashes of the track line.
final
- lineType → TrackballLineType
-
Type of trackball line. By default, vertical line will be displayed.
final
- lineWidth → double
-
Width of the track line.
final
- markerSettings → TrackballMarkerSettings?
-
Options to customize the markers that are displayed when trackball is
enabled.
final
- parentBox ↔ RenderBox?
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldAlwaysShow → bool
-
Shows or hides the trackball.
final
- tooltipAlignment → ChartAlignment
-
Alignment of the trackball tooltip.
final
- tooltipDisplayMode → TrackballDisplayMode
-
Display mode of tooltip.
final
- tooltipSettings → InteractiveTooltip
-
Customizes the trackball tooltip.
final
Methods
-
handleDoubleTap(
Offset position) → void - Called when pointer tap has contacted the screen double time in behavior.
-
handleEvent(
PointerEvent event, BoxHitTestEntry entry) → void - To customize the necessary pointer events in behaviors. (e.g., CrosshairBehavior, TrackballBehavior, ZoomingBehavior).
-
handleLongPressEnd(
LongPressEndDetails details) → void - Called when the pointer stops contacting the screen after a long-press by a primary button in behavior.
-
handleLongPressMoveUpdate(
LongPressMoveUpdateDetails details) → void - Called when moving after the long press gesture by a primary button is recognized in behavior.
-
handleLongPressStart(
LongPressStartDetails details) → void - Called when a long press gesture by a primary button has been recognized in behavior.
-
handlePointerEnter(
PointerEnterEvent details) → void - Called when a pointer or mouse enter on the screen.
-
handlePointerExit(
PointerExitEvent details) → void - Called when a pointer or mouse exit on the screen.
-
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.
-
handleTapUp(
TapUpDetails details) → void - Called when pointer has stopped contacting screen in behavior.
-
hide(
) → void - Hides the trackball if it is displayed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPaint(
PaintingContext context, Offset offset, SfChartThemeData chartThemeData, ThemeData themeData) → void - Override this method to customize the trackball tooltip labels and it's positions and line rendering.
-
show(
dynamic x, double y, [String coordinateUnit = 'point']) → void - Displays the trackball at the specified x and y-positions.
-
showByIndex(
int pointIndex) → void - Displays the trackball at the specified point index.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override