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

FieldConfig interface

Every property is optional

Plugins may extend this with additional properties. Something like series overrides

Signature

typescript
export interface FieldConfig<TOptions = any> 

Import

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

Properties

PropertyTypeDescription
colorFieldColor
customTOptions
decimalsnumber | null
descriptionstringHuman readable field metadata
displayNamestringThe display value for this field. This supports template variables blank is auto
displayNameFromDSstringThis can be used by data sources that return and explicit naming structure for values and labels When this property is configured, this value is used rather than the default naming strategy.
filterablebooleanTrue if data source field supports ad-hoc filters
intervalnumber | null
linksDataLink[]
mappingsValueMapping[]
maxnumber | null
minnumber | null
noValuestring
nullValueModeNullValueMode
pathstringAn explict path to the field in the datasource. When the frame meta includes a path, This will default to `${frame.meta.path}/${field.name}When defined, this value can be used as an identifier within the datasource scope, and may be used to update the results
thresholdsThresholdsConfig
unitstring
writeablebooleanTrue if data source can write a value to the path. Auth/authz are supported separately

color property

Signature

typescript
color?: FieldColor;

custom property

Signature

typescript
custom?: TOptions;

decimals property

Signature

typescript
decimals?: number | null;

description property

Human readable field metadata

Signature

typescript
description?: string;

displayName property

The display value for this field. This supports template variables blank is auto

Signature

typescript
displayName?: string;

displayNameFromDS property

This can be used by data sources that return and explicit naming structure for values and labels When this property is configured, this value is used rather than the default naming strategy.

Signature

typescript
displayNameFromDS?: string;

filterable property

True if data source field supports ad-hoc filters

Signature

typescript
filterable?: boolean;

interval property

Signature

typescript
interval?: number | null;

Signature

typescript
links?: DataLink[];

mappings property

Signature

typescript
mappings?: ValueMapping[];

max property

Signature

typescript
max?: number | null;

min property

Signature

typescript
min?: number | null;

noValue property

Signature

typescript
noValue?: string;

nullValueMode property

Signature

typescript
nullValueMode?: NullValueMode;

path property

An explict path to the field in the datasource. When the frame meta includes a path, This will default to `${frame.meta.path}/${field.name}

When defined, this value can be used as an identifier within the datasource scope, and may be used to update the results

Signature

typescript
path?: string;

thresholds property

Signature

typescript
thresholds?: ThresholdsConfig;

unit property

Signature

typescript
unit?: string;

writeable property

True if data source can write a value to the path. Auth/authz are supported separately

Signature

typescript
writeable?: boolean;