This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

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

Constructor Modifiers Description
constructor(len) Constructs a new instance of the IndexVector class

Properties

Property Modifiers Type Description
length number

Methods

Method Modifiers Description
get(index)
newField(len) static Returns a field representing the range [0 … length-1]

constructor(len)

Constructs a new instance of the IndexVector class

Signature

constructor(len: number);

Parameters

Parameter Type Description
len number

length property

Signature

get length(): number;

get method

Signature

get(index: number): number;

Parameters

Parameter Type Description
index number

Returns:

number

newField method

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

Signature

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

Parameters

Parameter Type Description
len number

Returns:

Field<number>