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

Field interface

Signature

typescript
export interface Field<T = any, V = Vector<T>> 

Import

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

Properties

PropertyTypeDescription
configFieldConfigMeta info about how field and how to display it
displayDisplayProcessorConvert a value for display
getLinks(config: ValueLinkConfig) => Array<LinkModel<Field>>Get value data links with variables interpolated
labelsLabels
namestringName of the field (column)
parse(value: any) => TConvert text to the field value
stateFieldState | nullCached values with appropriate display and id values
typeFieldTypeField value type (string, number, etc)
valuesV

config property

Meta info about how field and how to display it

Signature

typescript
config: FieldConfig;

display property

Convert a value for display

Signature

typescript
display?: DisplayProcessor;

Get value data links with variables interpolated

Signature

typescript
getLinks?: (config: ValueLinkConfig) => Array<LinkModel<Field>>;

labels property

Signature

typescript
labels?: Labels;

name property

Name of the field (column)

Signature

typescript
name: string;

parse property

Convert text to the field value

Signature

typescript
parse?: (value: any) => T;

state property

Cached values with appropriate display and id values

Signature

typescript
state?: FieldState | null;

type property

Field value type (string, number, etc)

Signature

typescript
type: FieldType;

values property

Signature

typescript
values: V;