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.

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
boundaryRect Rect
Represents the boundary rect for trackball.
getter/setter pair
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
position Offset?
Hold crosshair target position.
no setter
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
tooltipInfo ↔ ChartTrackballInfo?
getter/setter pair
tooltipPosition ↔ TooltipPositions?
getter/setter pair
tooltipSettings InteractiveTooltip
Customizes the trackball tooltip.
final
visiblePoints List<ClosestPoints>
getter/setter pair
xAxesInfo List<RenderChartAxis>
final
yAxesInfo List<RenderChartAxis>
final

Methods

hide() → void
Hides the trackball if it is displayed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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