dimension.item
Returns the name of the element at a position in a dimension.
js
dimension.item(dimensionName, index)Parameters
| Parameter | Type | Description |
|---|---|---|
dimensionName | string | The dimension's name. |
index | number | The element's position, starting at 0. |
Returns
stringThe element's name, or "" when there's no element at that position. Returns "Error: can not find any dimension with that name." when the dimension can't be found.
Examples
js
const elementName = dimension.item("time", 1);