Chart.selectItems

Syntax

selectItems (items, reset))

Parameters

items. JSON object that contains the following settings: <index of the series to be selected>: true.

reset. Indicates if the series selected before will be deselected.

Description

The selectItems method selects specified series in the chart.

Comments

Available values of the reset parameter:

Example

To execute the example, first execute the example on the page with description of the Chart.ItemsHovered method. Hover the cursor over chart series with the indices 0 and 1:

chart.selectItems({1: true, 0: true}, true);

After executing the example the first and second series in the chart are selected. The Chart.ItemsSelected event occurred: the browser console displays indices of the selected elements.

NOTE. If line chart type is set, the selection is not visible. To make the selection visible, set the chart type to histogram (Type: "Column").

See also:

Chart