ChartTooltip class

A tooltip widget for displaying information about chart data points.

The ChartTooltip widget provides a customizable tooltip that can be positioned relative to a target point and styled to match the chart's design.

Inheritance

Constructors

ChartTooltip({Key? key, required Widget child, required Offset targetPosition, TooltipPosition position = TooltipPosition.top, Offset offset = const Offset(0, 8), Color? backgroundColor, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(4)), EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8), List<BoxShadow>? boxShadow, Border? border, double? maxWidth, bool showArrow = true, double arrowSize = 6})
Creates a ChartTooltip widget.
const

Properties

arrowSize → double
The size of the arrow.
final
backgroundColor → Color?
The background color of the tooltip.
final
border → Border?
The border for the tooltip.
final
borderRadius → BorderRadius
The border radius of the tooltip.
final
boxShadow → List<BoxShadow>?
The box shadow for the tooltip.
final
child → Widget
The content to display in the tooltip.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxWidth → double?
The maximum width of the tooltip.
final
offset → Offset
The offset from the target position.
final
padding → EdgeInsets
The padding inside the tooltip.
final
position → TooltipPosition
The preferred position of the tooltip.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showArrow → bool
Whether to show the tooltip arrow.
final
targetPosition → Offset
The position of the tooltip relative to the target.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited