Class: Pointer

Highcharts. Pointer

new Pointer(chart, options)

The mouse and touch tracker object. Each Highcharts.Chart item has one assosiated Pointer item that can be accessed from the Highcharts.Chart.pointer property.

名字 类型 详情
chart Highcharts.Chart

The chart instance.

options Highcharts.Options

The root options object. The pointer uses options from the chart and tooltip structures.



Destroys the Pointer object and disconnects DOM events.

findNearestKDPoint(series, shared, e)

Finds the closest point to a set of coordinates, using the k-d-tree algorithm.

名字 类型 详情
series Array.<Highcharts.Series>

All the series to search in.

shared boolean | undefined

Whether it is a shared tooltip or not.

e Highcharts.PointerEventObject

The pointer event object, containing chart coordinates of the pointer.

Highcharts.Point | undefined .

The point closest to given coordinates.


Return the cached chartPosition if it is available on the Pointer, otherwise find it. Running offset is quite expensive, so it should be avoided when we know the chart hasn't moved.

Highcharts.ChartPositionObject .

The offset of the chart container within the page


Get the click position in terms of axis values.

名字 类型 详情
e Highcharts.PointerEventObject

Pointer event, extended with chartX and chartY properties.


inClass(element, className)

Utility to detect whether an element has, or has a parent with, a specificclass name. Used on detection of tracker objects and on deciding whether hovering the tooltip should cause the active series to mouse out.

名字 类型 详情
element Highcharts.SVGDOMElement | Highcharts.HTMLDOMElement

The element to investigate.

className string

The class name to look for.

boolean | undefined .

True if either the element or one of its parents has the given class name.

normalize(e [, chartPosition])

Takes a browser event object and extends it with custom Highcharts properties chartX and chartY in order to work on the internal coordinate system.

名字 类型 特质 详情
e global.MouseEvent | global.PointerEvent | global.TouchEvent

Event object in standard browsers.

chartPosition Highcharts.OffsetObject <可选>

Additional chart offset.

Highcharts.PointerEventObject .

A browser event with extended properties chartX and chartY.

reset( [allowMove] [, delay])

Reset the tracking by hiding the tooltip, the hover series state and the hover point

名字 类型 特质 详情
allowMove boolean <可选>

Instead of destroying the tooltip altogether, allow moving it if possible.

delay number <可选>