API Reference@grafana/dataIndexVector

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

ConstructorModifiersDescription
constructor(len)Constructs a new instance of the IndexVector class

Properties

PropertyModifiersTypeDescription
lengthnumber

Methods

MethodModifiersDescription
get(index)
newField(len)staticReturns a field representing the range [0 … length-1]

constructor(len)

Constructs a new instance of the IndexVector class

Signature

constructor(len: number);

Parameters

ParameterTypeDescription
lennumber

length property

Signature

get length(): number;

get method

Signature

get(index: number): number;

Parameters

ParameterTypeDescription
indexnumber

Returns:

number

newField method

Returns a field representing the range [0 … length-1]

Signature

static newField(len: number): Field<number>;

Parameters

ParameterTypeDescription
lennumber

Returns:

Field<number>