Class: Tooltip

Highcharts. Tooltip

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:

<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:

<readonly> shared :boolean|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 splitted 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
tooltip Highcharts.Tooltip
Returns:

destroy()

Removes and destroys the tooltip and its elements.

Returns:

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
delay number <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.

Returns:

refresh(pointOrPoints [, mouseEvent])

Refresh the tooltip's text and position.

Parameters:
Name Type Argument Description
pointOrPoints Highcharts.Point | Array.<Highcharts.Point>

Either a point or an array of points.

mouseEvent Highcharts.PointerEventObject <optional>

Mouse event, that is responsible for the refresh and should be used for the tooltip update.

Returns:

update(options)

Updates the tooltip with the provided tooltip options.

Parameters:
Name Type Description
options Highcharts.TooltipOptions

The tooltip options to update.

Returns: