IDataSeriesCollection
An iterable collection of data series.
export interface IDataSeriesCollection extends Iterable<IDataSeries>
Extends: Iterable<IDataSeries>
Remarks
The collection additionally includes basic information about the origin of the data series that can be iterated - their number, measures they were calculated from and the scoping attributes.
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| number | Number of available data series. | |
| Descriptors of measures that are used in the data series. | ||
| IMeasure[] | Definitions of measures which were sent to execution and resulted in the data series. | |
| (Optional) Descriptors of attributes that are used to create data series with scoped measure values. | ||
| (Optional) Definitions of attributes which were sent to execution and resulted in the data series with scoped measure values. |
Methods
Method | Description |
|---|---|
Returns iterator over all data series created for particular measure. | |
Returns first-found data series for the provided measure. | |
Returns all data series in an array. |
Property details
IDataSeriesCollection.countproperty
Number of available data series.
readonly count: number;
IDataSeriesCollection.fromMeasuresproperty
Descriptors of measures that are used in the data series.
readonly fromMeasures: IMeasureDescriptor[];
Remarks
Note that the number of measures MAY differ from number of data series - that is because the data series may be created for multiple scopes of each measure (e.g. measure X calculated for attribute element A, then same measure calculated for attribute element B etc)
IDataSeriesCollection.fromMeasuresDefproperty
Definitions of measures which were sent to execution and resulted in the data series.
readonly fromMeasuresDef: IMeasure[];
Remarks
Order of appearance matches the order of appearance in the fromMeasures array.
IDataSeriesCollection.scopingAttributesproperty
Descriptors of attributes that are used to create data series with scoped measure values.
readonly scopingAttributes?: IAttributeDescriptor[];
IDataSeriesCollection.scopingAttributesDefproperty
Definitions of attributes which were sent to execution and resulted in the data series with scoped measure values.
readonly scopingAttributesDef?: IAttribute[];
Remarks
Order of apperance matches the order of appreance in the scopingAttributes array.
Method details
IDataSeriesCollection.allForMeasure()method
Returns iterator over all data series created for particular measure.
allForMeasure(localIdOrMeasure: string | IMeasure): Iterable<IDataSeries>;
Parameters
Parameter | Type | Description |
|---|---|---|
localIdOrMeasure | string | IMeasure | local id of measure or measure object to get local id from |
Returns
Iterable<IDataSeries>
iterable with no elements
IDataSeriesCollection.firstForMeasure()method
Returns first-found data series for the provided measure.
firstForMeasure(localIdOrMeasure: string | IMeasure): IDataSeries;
Parameters
Parameter | Type | Description |
|---|---|---|
localIdOrMeasure | string | IMeasure | local id of measure or measure object to get local id from |
Returns
data series
Exceptions
error if no data series or no data series from the provided measure
Remarks
This is a ‘get-or-die’ method and will throw in case data series from the provided measure is not located.
IDataSeriesCollection.toArray()method
Returns all data series in an array.
toArray(): IDataSeries[];
Returns
empty if no data series
Remarks
Note: if you are looking for a subset of measures, always prefer using the first-class methods and in favor of getting the array and filtering yourself.