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

FormattedVector class

Signature

typescript
export declare class FormattedVector<T = any> implements Vector<string> 

Import

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

Constructors

ConstructorModifiersDescription
constructor(source, formatter)Constructs a new instance of the FormattedVector class

Properties

PropertyModifiersTypeDescription
lengthnumber

Methods

MethodModifiersDescription
get(index)
toArray()
toJSON()

constructor(source, formatter)

Constructs a new instance of the FormattedVector class

Signature

typescript
constructor(source: Vector<T>, formatter: DisplayProcessor);

Parameters

ParameterTypeDescription
sourceVector<T>
formatterDisplayProcessor

length property

Signature

typescript
get length(): number;

get method

Signature

typescript
get(index: number): string;

Parameters

ParameterTypeDescription
indexnumber

Returns:

string

toArray method

Signature

typescript
toArray(): string[];

Returns:

string[]

toJSON method

Signature

typescript
toJSON(): string[];

Returns:

string[]