Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
IndexVector class
IndexVector is a simple vector implementation that returns the index value for each element in the vector. It is functionally equivolant a vector backed by an array with values: [0,1,2,...,length-1]
Signature
export declare class IndexVector extends FunctionalVector<number>
Import
import { IndexVector } from '@grafana/data';
Constructors
Properties
Methods
constructor(len)
Constructs a new instance of the IndexVector
class
Signature
constructor(len: number);
Parameters
length property
Signature
get length(): number;
get method
Signature
get(index: number): number;
Parameters
Returns:
number
newField method
Returns a field representing the range [0 … length-1]
Signature
static newField(len: number): Field<number>;
Parameters
Returns:
Field<number>