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 extends object = any> 

Import

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

Properties

PropertyTypeDescription
colorFieldColor
customTOptions
decimalsnumber | null
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
linksDataLink[]
mappingsValueMapping[]
maxnumber | null
minnumber | null
noValuestring
nullValueModeNullValueMode
thresholdsThresholdsConfig
unitstring

color property

Signature

typescript
color?: FieldColor;

custom property

Signature

typescript
custom?: TOptions;

decimals property

Signature

typescript
decimals?: number | null;

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;

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;

thresholds property

Signature

typescript
thresholds?: ThresholdsConfig;

unit property

Signature

typescript
unit?: string;