dimension.size
Returns the number of elements in a dimension.
js
dimension.size(dimensionName)Parameters
| Parameter | Type | Description |
|---|---|---|
dimensionName | string | The dimension's name. |
Returns
numberThe number of elements, or 0 when the dimension can't be found. Use dimension.elementCount if you need to tell a missing dimension from an empty one.
Examples
js
const dimensionSize = dimension.size("time");