Skip to main content

Point Class

The Point class represents individual data points in a series. Points are generated from the series.data configuration and can be accessed from the series.points array. Source: ts/Core/Series/Point.ts:120

Overview

Points can be accessed in multiple ways:

Constructor

Points are typically created automatically from series data, not instantiated directly.
Constructor Signature (Source: ts/Core/Series/Point.ts:128):

Properties

point.series

Highcharts.Series
required
The series this point belongs to

point.x

number
required
The x-value of the point

point.y

number
The y-value of the point

point.category

string | number
required
For categorical axes, the category name. For other axes, same as x.
Source: ts/Core/Series/Point.ts:167

point.name

string
The name of the point

point.color

ColorType
The point’s current color
Source: ts/Core/Series/Point.ts:172

point.colorIndex

number
Color index for styled mode
Source: ts/Core/Series/Point.ts:178

point.index

number
required
Index in the series.points array
Source: Referenced in ts/Core/Series/PointBase.ts:140

point.selected

boolean
Whether the point is currently selected

point.plotX

number
Translated X position in pixels relative to the plot area
Source: Referenced in ts/Core/Series/PointBase.ts:154

point.plotY

number
Translated Y position in pixels relative to the plot area
Source: Referenced in ts/Core/Series/PointBase.ts:168

point.graphic

SVGElement
SVG element representing the point in the chart
Source: Referenced in ts/Core/Series/Point.ts:196

point.options

PointOptions
Configuration options for this point

Methods

point.update()

Update the point with new options.
PointOptions | number
required
New point options or y-value
boolean
default:"true"
Whether to redraw the chart
boolean | AnimationOptions
Animation options

point.remove()

Remove the point from the series.
boolean
default:"true"
Whether to redraw the chart
boolean | AnimationOptions
Animation options

point.select()

Select or unselect the point.
boolean
default:"undefined"
True to select, false to deselect, undefined to toggle
boolean
default:"false"
Whether to add to current selection or replace it
Source: Referenced in ts/Core/Series/PointBase.ts:84

point.setState()

Set the point’s visual state.
'hover' | 'select' | 'inactive' | ''
The state to set (empty string for normal)
boolean
Whether to animate to the new state
Source: Referenced in ts/Core/Series/PointBase.ts:85

point.onMouseOver()

Trigger the mouse over event.
PointerEvent
Mouse event
Source: Referenced in ts/Core/Series/PointBase.ts:83

point.onMouseOut()

Trigger the mouse out event.
Source: Referenced in ts/Core/Series/PointBase.ts:82

point.importEvents()

Import point events from options.
Source: Referenced in ts/Core/Series/PointBase.ts:81

point.firePointEvent()

Fire a point event.
string
required
The event type
object
Event arguments
Function
Default event handler

point.tooltipFormatter()

Format the tooltip for this point.
string
required
The format string
Returns: string

Events

Point events are configured in the plotOptions.series.point.events or individual point options:
Common point events:
  • click - Point clicked
  • mouseOver / mouseOut - Mouse hover
  • select / unselect - Selection state change
  • update - Point updated
  • remove - Point removed
  • drag / drop - Point dragging (with draggable-points module)

Example: Interactive Points

Example: Point Annotations

See Also