new Tooltip(chart, options)
Tooltip of a chart.
Parameters:
| Name | Type | Description |
|---|---|---|
chart |
Highcharts.Chart | The chart instance. |
options |
Highcharts.TooltipOptions | Tooltip options. |
Members
-
<readonly> chart :Highcharts.Chart
-
Chart of the tooltip.
Type:
-
container :Highcharts.HTMLDOMElement|undefined
-
Reference to the tooltip's container, when [Highcharts.Tooltip#outside] is set to true, otherwise it's undefined.
Type:
- Highcharts.HTMLDOMElement | undefined
-
<readonly> options :Highcharts.TooltipOptions
-
Used tooltip options.
Type:
- Highcharts.TooltipOptions
-
<readonly> outside :boolean
-
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.
Type:
- boolean
- To Do:
-
- Split tooltip does not support outside in the first iteration. Should not be too complicated to implement.
-
renderer :Highcharts.SVGRenderer|undefined
-
Reference to the tooltip's renderer, when [Highcharts.Tooltip#outside] is set to true, otherwise it's undefined.
Type:
- Highcharts.SVGRenderer | undefined
-
When the tooltip is shared, the entire plot area will capture mouse movement or touch events.
Type:
- boolean | undefined
-
<readonly> split :boolean|undefined
-
True, if the tooltip is split into one label per series, with the header close to the axis.
Type:
- boolean | undefined
Methods
-
defaultFormatter(tooltip)
-
In case no user defined formatter is given, this will be used. Note that the context here is an object holding point, series, x, y etc.
Parameters:
Name Type Description tooltipHighcharts.Tooltip Returns:
-
destroy()
-
Removes and destroys the tooltip and its elements.
-
getLabel()
-
Creates the Tooltip label element if it does not exist, then returns it.
Returns:
-
hide( [delay])
-
Hides the tooltip with a fade out animation.
Parameters:
Name Type Argument Description delaynumber <optional>
The fade out in milliseconds. If no value is provided the value of the tooltip.hideDelay option is used. A value of 0 disables the fade out animation.
-
refresh(pointOrPoints [, mouseEvent])
-
Refresh the tooltip's text and position.
Parameters:
Name Type Argument Description pointOrPointsHighcharts.Point | Array.<Highcharts.Point> Either a point or an array of points.
mouseEventHighcharts.PointerEventObject <optional>
Mouse event, that is responsible for the refresh and should be used for the tooltip update.
-
update(options)
-
Updates the tooltip with the provided tooltip options.
Parameters:
Name Type Description optionsHighcharts.TooltipOptions The tooltip options to update.