Skip to main content

Series Class

The Series class represents data visualizations within a chart. All series types (line, column, pie, etc.) inherit from this base class. Source: ts/Core/Series/Series.ts:255

Overview

Series objects can be accessed in multiple ways:

Constructor

Series are typically created via chart configuration or chart.addSeries(), not directly instantiated.

Static Properties

Series.types

Dictionary<typeof Series>
required
Registry of all available series types
Source: ts/Core/Series/Series.ts:272

Series.registerType()

Function
required
Registers a custom series type
Source: ts/Core/Series/Series.ts:292

Properties

series.chart

Highcharts.Chart
required
The chart instance this series belongs to
Source: ts/Core/Series/Series.ts:373

series.data

Array<Highcharts.Point>
required
Currently visible point objects. May not contain all points if cropped or grouped.
Source: ts/Core/Series/Series.ts:407

series.points

Array<Highcharts.Point>
All currently visible point objects

series.options

SeriesOptions
required
The series configuration options

series.name

string
The series name as shown in the legend and tooltip

series.index

number
required
Position in the chart.series array
Source: ts/Core/Series/Series.ts:471

series.visible

boolean
Whether the series is currently visible

series.color

ColorType
The series color used by the legend and visualization
Source: ts/Core/Series/Series.ts:384

series.xAxis

Highcharts.Axis
The X axis the series is associated with

series.yAxis

Highcharts.Axis
The Y axis the series is associated with

series.dataMin

number
Minimum value of the series data points
Source: ts/Core/Series/Series.ts:425

series.dataMax

number
Maximum value of the series data points
Source: ts/Core/Series/Series.ts:416

Methods

series.addPoint()

Add a point to the series after render time.
PointOptions | number | [number, number]
required
Point configuration, y-value, or [x, y] tuple
boolean
default:"true"
Whether to redraw the chart
boolean
default:"false"
If true, remove the first point when adding (maintains constant length)
boolean | AnimationOptions
Animation options

series.removePoint()

Remove a point from the series.
number
required
Index of the point to remove
boolean
default:"true"
Whether to redraw the chart
boolean | AnimationOptions
Animation options

series.setData()

Apply a new set of data to the series.
Array<PointOptions | number | [number, number]>
required
New data array
boolean
default:"true"
Whether to redraw the chart
boolean | AnimationOptions
Animation options
boolean
default:"true"
Whether to update existing points or recreate all

series.update()

Update the series with new options.
SeriesOptions
required
New series options to merge
boolean
default:"true"
Whether to redraw the chart

series.remove()

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

series.show()

Show the series if hidden.

series.hide()

Hide the series.

series.select()

Select or unselect the series.
boolean
default:"true"
Whether to select or unselect

series.setVisible()

Set the visibility of the series.
boolean
required
Whether to show or hide
boolean
default:"true"
Whether to redraw

series.drawGraph()

Draw the series graph (used internally).

series.getColumn()

Get a data column from the series data table.
string
required
Name of the column to retrieve
Source: Referenced in ts/Core/Series/Series.ts:233

Events

Series events are configured in the plotOptions.series.events or individual series events option:
See Events API for complete event documentation.

Example: Dynamic Series Management

See Also