Point Class
The Point class represents individual data points in a series. Points are generated from theseries.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.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.
ts/Core/Series/Point.ts:167
point.name
string
The name of the point
point.color
ColorType
The point’s current color
ts/Core/Series/Point.ts:172
point.colorIndex
number
Color index for styled mode
ts/Core/Series/Point.ts:178
point.index
number
required
Index in the series.points array
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
ts/Core/Series/PointBase.ts:154
point.plotY
number
Translated Y position in pixels relative to the plot area
ts/Core/Series/PointBase.ts:168
point.graphic
SVGElement
SVG element representing the point in the chart
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
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
ts/Core/Series/PointBase.ts:85
point.onMouseOver()
Trigger the mouse over event.PointerEvent
Mouse event
ts/Core/Series/PointBase.ts:83
point.onMouseOut()
Trigger the mouse out event.ts/Core/Series/PointBase.ts:82
point.importEvents()
Import point events from options.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
string
Events
Point events are configured in theplotOptions.series.point.events or individual point options:
click- Point clickedmouseOver/mouseOut- Mouse hoverselect/unselect- Selection state changeupdate- Point updatedremove- Point removeddrag/drop- Point dragging (with draggable-points module)
Example: Interactive Points
Example: Point Annotations
See Also
- Series Class - Parent series
- Series Options - Point configuration
- Events API - Point events
- Chart Class - Chart instance