Interface: DataPointSelectionsAPI

DataPointSelectionsAPI

API class that is used to control data point selections within a visualization.

Example

content.getFeature('DataPointSelections')

Methods

clearAll(transactionToken)

Clears all data point selections from the visualization

Parameters:
Name Type Description
transactionToken TransactionToken

Transaction token

Fires:

deselect(dataPointSelection, transactionToken)

Deselects data points of the visualization with the given selection spec.

Parameters:
Name Type Description
dataPointSelection Array.<DataPointSelection>

Array of data point selection spec

transactionToken TransactionToken

Transaction token

Fires:

getSelections(selectedDataItemList) → {Array.<DataPointSelection>}

Returns the list of data point selections.

Parameters:
Name Type Description
selectedDataItemList Array

Optional array containing the selected data items

Returns:

Array of data point selections

Type
Array.<DataPointSelection>

isSelected(dataPointSelection) → {boolean}

Checks whether the given resolved items are selected.

Parameters:
Name Type Description
dataPointSelection Array.<DataPointSelection>

Array of data point selection spec

Returns:

True if the resolved items are included in the current selections.

Type
boolean

select(dataPointSelection, transactionToken)

Selects data points of the visualization with the given selection spec.

Parameters:
Name Type Description
dataPointSelection Array.<DataPointSelection>

Array of data point selection spec

transactionToken TransactionToken

Transaction token

Fires:

Type Definitions

Category

Type:
  • Object
Properties:
Name Type Description
dataItemId String

dataItem id of the category data

columnId String

column id of the category data

label String

display label of the category data

value String

value of the category data

DataPointSelection

Type:
  • Object
Properties:
Name Type Attributes Description
categories Array.<Category>

Array of categeory specs

facts Array.<Fact> <optional>

Array of categeory specs

Fact

Type:
  • Object
Properties:
Name Type Description
dataItemId String

dataItem id of the fact data

columnId String

column id of the fact data

value String

value of the fact data

Events

CanvasAPI change:content:selections:clearAll

CanvasAPI change:content:selections:deselect

CanvasAPI change:content:selections:select

ContentAPI change:selections:clearAll

ContentAPI change:selections:deselect

ContentAPI change:selections:select