IDataSlice
Data slice is a sequence of data points that are all computed for a particular attribute elements and/or totals but different data series.
export interface IDataSlice extends DataSliceDescriptorMethods, Iterable<DataPoint>
Extends: DataSliceDescriptorMethods, Iterable<DataPoint>
Remarks
In other words, data slice allows iterating over two dimension data view _across_ the dimension which contains the measures.
For convenience, the data slice is iterable over the Data Points. You can use it either in for-of loop or spread data slice into an array of DataPoints.
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| Descriptor of this data slice - what attributes or totals are the data points calculated for. | ||
| Unique identifier of the data slice. This can be used to directly access this data slice from data view. |
Methods
Method | Description |
|---|---|
Property details
IDataSlice.descriptorproperty
Descriptor of this data slice - what attributes or totals are the data points calculated for.
readonly descriptor: DataSliceDescriptor;
IDataSlice.idproperty
Unique identifier of the data slice. This can be used to directly access this data slice from data view.
readonly id: DataSliceId;
Method details
IDataSlice.dataPoints()method
dataPoints(): DataPoint[];
Returns
- all data points in this slice
Remarks
the slice is iterable over data points; if you want to iterate using for-of loop then it is not necessary to call this method - just use for (const dataPoint of slice) {...}
IDataSlice.rawData()method
rawData(): DataValue[];
Returns
raw, unformatted data for this slice.
Remarks
if you need to work with fully annotated and formatted data, use the DataPoint iterator