import type { GeoJsonDataType } from './types'; import { DataPoint } from './DataPoint'; import { DataPrimitive, DataType, IDataSeries, TypedValue } from './DataPrimitive'; /** * DataSeries class and associated DataSeries selectors * @implements {DataPrimitive} */ export declare class DataSeries implements DataPrimitive, IDataSeries { get points(): DataPoint[]; protected internalPoints: DataPoint[]; readonly field: string; type: string; static isDataSeries(o: any): o is DataSeries; static fromRaw(pts: any[]): DataSeries; /** * * @param {array} points list of data points * @param {string} type user explicitly sets the data type */ constructor(points?: DataPoint[], type?: string, field?: string); /** * Return first dataPoint in series. * @public * @returns {DataPoint} */ firstPoint(): DataPoint; /** * Return last dataPoint in series. * @public * @returns {DataPoint} */ lastPoint(): DataPoint; /** * Finds dataPoint(s) in DataSeries by index(es). * @public * @param {...number} indexes * @returns {DataSeries} */ pointsByIndexes(...indexes: number[]): DataSeries; /** * Finds and returns the individual dataPoint at the given index. * @public * @param {number} index * @returns {DataPoint} */ pointByIndex(indexIn: number): DataPoint; /** * Finds the delta between the last point and point at the given index. * A negative index can be used, indicating an offset from the end of the sequence. * @public * @param {number} index * @returns {DataPoint} */ delta(index: number): DataPoint; /** * Sets all the values in the Data Series to a static TypedValue. * @param {TypedValue} v */ setValue(v: TypedValue): void; /** * Gets all the values + their type in the Data Series. * @returns {TypedValue[]} */ getValue(): TypedValue[]; /** * Gets all the values (only) in the Data Series. * @returns {array} */ getRawValue(): (string | number | GeoJsonDataType)[]; /** * Returns the data source field which the series belongs to. * @public * @returns {DataPoint<'string'>} */ getField(): DataPoint<'string'>; /** * Returns the inferred data type of the series. * @public * @returns {string} */ getType(): string; /** * Returns the minimum DataPoint in the series or undefined if no numbers in series. * @public * @returns {DataPoint} */ min(): DataPoint; /** * Returns the maximum DataPoint in the series. * @public * @returns {DataPoint} */ max(): DataPoint; private reduce; }