BarTouchTooltipData class
Holds representation data for showing tooltip popup on top of rods.
Constructors
- BarTouchTooltipData({double? tooltipRoundedRadius, EdgeInsets? tooltipPadding, double? tooltipMargin, FLHorizontalAlignment? tooltipHorizontalAlignment, double? tooltipHorizontalOffset, double? maxContentWidth, GetBarTooltipItem? getTooltipItem, GetBarTooltipColor? getTooltipColor, bool? fitInsideHorizontally, bool? fitInsideVertically, TooltipDirection? direction, double? rotateAngle, BorderSide? tooltipBorder})
-
if BarTouchData.handleBuiltInTouches is true,
BarChart shows a tooltip popup on top of rods automatically when touch happens,
otherwise you can show it manually using BarChartGroupData.showingTooltipIndicators.
Tooltip shows on top of rods, with
getTooltipColor
as a background color, and you can set corner radius usingtooltipRoundedRadius
. If you want to have a padding inside the tooltip, filltooltipPadding
, or If you want to have a bottom margin, settooltipMargin
. Content of the tooltip will provide usinggetTooltipItem
callback, you can override it and pass your custom data to show in the tooltip. You can restrict the tooltip's width usingmaxContentWidth
. Sometimes, BarChart shows the tooltip outside of the chart, you can setfitInsideHorizontally
true to force it to shift inside the chart horizontally, also you can setfitInsideVertically
true to force it to shift inside the chart vertically.
Properties
- direction → TooltipDirection
-
Controls showing tooltip on top or bottom, default is auto.
final
- fitInsideHorizontally → bool
-
Forces the tooltip to shift horizontally inside the chart, if overflow happens.
final
- fitInsideVertically → bool
-
Forces the tooltip to shift vertically inside the chart, if overflow happens.
final
- getTooltipColor → GetBarTooltipColor
-
Retrieves data for setting background color of the tooltip.
final
- getTooltipItem → GetBarTooltipItem
-
Retrieves data for showing content inside the tooltip.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxContentWidth → double
-
Restricts the tooltip's width.
final
-
props
→ List<
Object?> -
Used for equality check, see
EquatableMixin
.no setter - rotateAngle → double
-
Controls the rotation of the tooltip.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - tooltipBorder → BorderSide
-
The tooltip border color.
final
- tooltipHorizontalAlignment → FLHorizontalAlignment
-
Controls showing tooltip on left side, right side or center aligned with rod, default is center
final
- tooltipHorizontalOffset → double
-
Applies horizontal offset for showing tooltip, default is zero.
final
- tooltipMargin → double
-
Applies a bottom margin for showing tooltip on top of rods.
final
- tooltipPadding → EdgeInsets
-
Applies a padding for showing contents inside the tooltip.
final
- tooltipRoundedRadius → double
-
Sets a rounded radius for the tooltip.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited