Methods

This section describes the methods that can be used in code to manipulate the Series object.

clearSelection()

Unselects all the selected points of the series. The points are displayed in an initial style.

To learn about point selection, refer to the Selection Handling section.

deselectPoint(point)

Deselects the specified point. The point is displayed in an initial style.

Parameters:
point: Point

The point to be deselected.

To learn about point selection, refer to the Selection Handling section.

getAllPoints()

Returns an array of all points in the series.

Return Value: Array

The points from the series point collection.

getPointByArg(pointArg)

Gets a point from the series point collection based on the specified argument.

Parameters:
pointArg: Number|String|Date

The argument of the point to be found.

Return Value: Object

The point that is found by the specified argument.

If a point with the specified argument is not found, the function returns null.

getPointByPos(positionIndex)

Gets a point from the series point collection based on the specified point position.

Parameters:
positionIndex: Number

The index of the point to be found within the series point collection.

Return Value: Object

The point that is found by the specified position index.

Points in the series point collection are arranged as they go along the argument axis from left to right. Note that the series are numbered from zero in the series collection.

getPointsByArg(pointArg)

Gets points from the series point collection based on the specified argument.

Parameters:
pointArg: Number|String|Date

The argument of the point(s) to be found.

Return Value: Array

The points that are found by the specified argument.

If a point with the specified argument is not found, the function returns empty array.

getVisiblePoints()

Returns visible series points.

Return Value: Array

Visible points.

Use this method to get points that lay within the visible range defined by the min and max options of an axis. This method is also useful if you need to obtain the points displayed when data aggregation is applied.

NOTE: If a chart series or its points are not displayed as hidden from code, the getVisiblePoints() method called for this series still returns points that lay within the visible range as if these points were visible.

hide()

Hides a particular series.

This method hides a series at runtime. To specify a series hidden at design-time, set the series | visible option to false.

isHovered()

Provides information about the hover state of a series.

Return Value: true|false

Hover state of a series.

When a series is hovered over, this method returns true. Otherwise, the returned value is false.

isSelected()

Provides information about the selection state of a series.

Return Value: true|false

Selection state of a series.

When a series is selected, this method returns true. Otherwise, the returned value is false.

You can select a series using its select() method. To learn more about point and series selection, refer to the Selection Handling topic.

isVisible()

Provides information about the visibility state of a series.

Return Value: Boolean

Visibility state of a series.

When a series is visible, this method returns true. Otherwise, the returned value is false.

You can make a series visible using its show() method, or hide a series using its hide() method.

select()

Selects the series. The series is displayed in a 'selected' style until another series is selected or the current series is deselected programmatically.

To learn about series selection, refer to the Selection Handling section.

selectPoint(point)

Selects the specified point. The point is displayed in a 'selected' style.

Parameters:
point: Point

The point to be selected.

For information on point selection, refer to the Selection Handling section.

show()

Makes a particular series visible.