Menu

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.

Enterprise Open source

ConstantVector class

Signature

typescript
export declare class ConstantVector<T = any> implements Vector<T> 

Import

typescript
import { ConstantVector } from '@grafana/data';

Constructors

ConstructorModifiersDescription
constructor(value, len)Constructs a new instance of the ConstantVector class

Properties

PropertyModifiersTypeDescription
lengthnumber

Methods

MethodModifiersDescription
get(index)
toArray()
toJSON()

constructor(value, len)

Constructs a new instance of the ConstantVector class

Signature

typescript
constructor(value: T, len: number);

Parameters

ParameterTypeDescription
valueT
lennumber

length property

Signature

typescript
get length(): number;

get method

Signature

typescript
get(index: number): T;

Parameters

ParameterTypeDescription
indexnumber

Returns:

T

toArray method

Signature

typescript
toArray(): T[];

Returns:

T[]

toJSON method

Signature

typescript
toJSON(): T[];

Returns:

T[]