HighchartsTooltipOptions class
Options for the tooltip that appears when the user hovers over a series or point.
- Inheritance
-
- Object
- HighchartsOptionsBase
- HighchartsTooltipOptions
Constructors
-
HighchartsTooltipOptions.new({HighchartsTooltipAnimationOptions? animation, String? backgroundColor, String? borderColor, double? borderRadius, double? borderWidth, double? changeDecimals, String? className, String? clusterFormat, bool? crosshairs, HighchartsTooltipDateTimeLabelFormatsOptions? dateTimeLabelFormats, double? distance, bool? enabled, bool? fixed, bool? followPointer, bool? followTouchMove, String? format, dynamic formatter, String? headerFormat, String? headerShape, double? hideDelay, String? nullFormat, dynamic nullFormatter, bool? outside, double? padding, String? pointFormat, dynamic pointFormatter, HighchartsTooltipPositionOptions? position, dynamic positioner, Map<
String, dynamic> ? shadow, String? shape, dynamic snap, bool? split, bool? stickOnContact, HighchartsTooltipStyleOptions? style, bool? useHTML, double? valueDecimals, String? valuePrefix, String? valueSuffix, String? xDateFormat}) - Options for the tooltip that appears when the user hovers over a series or point.
Properties
- animation ↔ HighchartsTooltipAnimationOptions?
-
Enable or disable animation of the tooltip.
getter/setter pair
- backgroundColor ↔ String?
-
The background color or gradient for the tooltip.
getter/setter pair
- borderColor ↔ String?
-
The color of the tooltip border. When
undefined
, the border takes the color of the corresponding series or point.getter/setter pair - borderRadius ↔ double?
-
The radius of the rounded border corners.
getter/setter pair
- borderWidth ↔ double?
-
The pixel width of the tooltip border. Defaults to 0 for single
tooltips and fixed tooltips, otherwise 1 for split tooltips.
getter/setter pair
- changeDecimals ↔ double?
-
How many decimals to show for the
point.change
or thepoint.cumulativeSum
value when theseries.compare
or theseries.cumulative
option is set. This is overridable in each series' tooltip options object.getter/setter pair - className ↔ String?
-
A CSS class name to apply to the tooltip's container div,
allowing unique CSS styling for each chart.
getter/setter pair
- clusterFormat ↔ String?
-
The HTML of the grouped point's nodes in the tooltip. Works only for
Treemap series grouping and analogously to
pointFormat.
getter/setter pair
- crosshairs ↔ bool?
-
Since 4.1, the crosshair definitions are moved to the Axis object
in order for a better separation from the tooltip. See
xAxis.crosshair.
getter/setter pair
- dateTimeLabelFormats ↔ HighchartsTooltipDateTimeLabelFormatsOptions?
-
For series on datetime axes, the date format in the tooltip's
header will by default be guessed based on the closest data points.
This member gives the default string representations used for
each unit. For an overview of the string or object configuration, see
dateFormat.
getter/setter pair
- distance ↔ double?
-
Distance from point to tooltip in pixels.
getter/setter pair
- enabled ↔ bool?
-
Enable or disable the tooltip.
getter/setter pair
- fixed ↔ bool?
-
Whether the tooltip should be fixed to one position in the chart, or
located next to the point or mouse. When the tooltip is fixed, the
position can be further specified with the
tooltip.position options set.
getter/setter pair
- followPointer ↔ bool?
-
Whether the tooltip should follow the mouse as it moves across
columns, pie slices and other point types with an extent.
By default it behaves this way for pie, polygon, map, sankey
and wordcloud series by override in the
plotOptions
for those series types.getter/setter pair - followTouchMove ↔ bool?
-
Whether the tooltip should update as the finger moves on a touch
device. If this is
true
and chart.panning is set,followTouchMove
will take over one-finger touches, so the user needs to use two fingers for zooming and panning.getter/setter pair -
A string to append to the tooltip format.
getter/setter pair
- format ↔ String?
-
A format string
for the whole shared tooltip. When format strings are a requirement,
it is usually more convenient to use
headerFormat
,pointFormat
andfooterFormat
, but theformat
option allows combining them into one setting.getter/setter pair - formatter ↔ dynamic
-
Callback function to format the text of the tooltip from scratch. In
case of single or shared tooltips, a string should
be returned. In case of split tooltips, it should
return an array where the first item is the header, and subsequent
items are mapped to the points. Return
false
to disable tooltip for a specific point on series.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- headerFormat ↔ String?
-
The HTML of the tooltip header line. The context is the
Point class.
Variables are enclosed in curly brackets. Examples of common
variables to include are
x
,y
,series.name
andseries.color
and other properties on the same form. Thepoint.key
variable contains the category name, x value or datetime string depending on the type of axis. For datetime axes, thepoint.key
date format can be set usingtooltip.xDateFormat
.getter/setter pair - headerShape ↔ String?
-
The name of a symbol to use for the border around the tooltip
header. Applies only when tooltip.split is
enabled.
getter/setter pair
- hideDelay ↔ double?
-
The number of milliseconds to wait until the tooltip is hidden when
mouse out from a point or chart.
getter/setter pair
- nullFormat ↔ String?
-
The HTML of the null point's line in the tooltip. Works analogously
to pointFormat.
getter/setter pair
- nullFormatter ↔ dynamic
-
Callback function to format the text of the tooltip for
visible null points.
Works analogously to formatter.
getter/setter pair
- outside ↔ bool?
-
Whether to allow the tooltip to render outside the chart's SVG
element box. By default (
false
), the tooltip is rendered within the chart's SVG element, which results in the tooltip being aligned inside the chart area. For small charts, this may result in clipping or overlapping. Whentrue
, a separate SVG element is created and overlaid on the page, allowing the tooltip to be aligned inside the page itself. Beware that with this option active, CSS classes on the chart's target container, with classnames matching the pattern 'highcharts-*', will be set on the tooltip as well. This is done to support theming for tooltips with this option.getter/setter pair - padding ↔ double?
-
Padding inside the tooltip, in pixels.
getter/setter pair
- pointFormat ↔ String?
-
The HTML of the point's line in the tooltip. The context is the
Point class.
Variables are enclosed in curly brackets. Examples of common
variables to include are
x
,y
,series.name
andseries.color
and other properties on the same form. Furthermore,y
can be extended by thetooltip.valuePrefix
andtooltip.valueSuffix
variables. This can also be overridden for each series, which makes it a good hook for displaying units.getter/setter pair - pointFormatter ↔ dynamic
-
A callback function for formatting the HTML output for a single point
in the tooltip. Like the
pointFormat
string, but with more flexibility.getter/setter pair - position ↔ HighchartsTooltipPositionOptions?
-
Positioning options for fixed tooltip, taking effect only when
tooltip.fixed is
true
.getter/setter pair - positioner ↔ dynamic
-
A callback function to place the tooltip in a custom position. The
callback receives three parameters:
labelWidth
,labelHeight
andpoint
, where point contains values forplotX
andplotY
telling where the reference point is in the plot area. Addchart.plotLeft
andchart.plotTop
to get the full coordinates.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shadow
↔ Map<
String, dynamic> ? -
Whether to apply a drop shadow to the tooltip. Defaults to true,
unless the tooltip is fixed.
getter/setter pair
- shape ↔ String?
-
The name of a symbol to use for the border around the tooltip. Can
be one of:
"callout"
,"circle"
or"rect"
. When tooltip.split option is enabled, shape is applied to all boxes except header, which is controlled by tooltip.headerShape.getter/setter pair -
Shows information in the tooltip for all points with the same X
value. When the tooltip is shared, the entire plot area will capture
mouse movement or touch events. Tooltip texts for series types with
ordered data (not pie, scatter, flags etc) will be shown in a single
bubble. This is recommended for single series charts and for
tablet/mobile optimized charts.
getter/setter pair
- snap ↔ dynamic
-
Proximity snap for graphs or single points. It defaults to 10 for
mouse-powered devices and 25 for touch devices.
getter/setter pair
- split ↔ bool?
-
Shows tooltip for all points with the same X value. Splits the
tooltip into one label per series, with the header close to the axis.
This is recommended over shared
tooltips for charts with multiple line series, generally making them
easier to read. This option takes precedence over
tooltip.shared
.getter/setter pair - stickOnContact ↔ bool?
-
Prevents the tooltip from switching or closing when touched or
pointed.
getter/setter pair
- style ↔ HighchartsTooltipStyleOptions?
-
CSS styles for the tooltip. The tooltip can also be styled through
the CSS class
.highcharts-tooltip
.getter/setter pair - useHTML ↔ bool?
-
Use HTML to render the contents of the tooltip instead of SVG. Using
HTML allows advanced formatting like tables and images in the
tooltip. It is also recommended for rtl languages as it works around
rtl bugs in early Firefox.
getter/setter pair
- valueDecimals ↔ double?
-
How many decimals to show in each series' y value. This is
overridable in each series' tooltip options object. The default is to
preserve all decimals.
getter/setter pair
- valuePrefix ↔ String?
-
A string to prepend to each series' y value. Overridable in each
series' tooltip options object.
getter/setter pair
- valueSuffix ↔ String?
-
A string to append to each series' y value. Overridable in each
series' tooltip options object.
getter/setter pair
- xDateFormat ↔ String?
-
The format for the date in the tooltip header if the X axis is a
datetime axis. The default is a best guess based on the smallest
distance between points in the chart.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJSON(
) → String -
Serializes the settings to a JSON string.
inherited
-
toOptionsJSON(
StringBuffer buffer) → void -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited