Grafana Field Configuration
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
Checked on 2026-11-09 against Grafana 13.3.x.
To do this by hand, follow Time Series Panels, Tables and Thresholds, Value Mappings, Overrides and Data Links.
A query returns numbers. Whether a reader understands them is decided afterwards, by a layer that Grafana calls field
configuration: the unit that turns 0.0123 into "1.23%", the thresholds that colour it red, the mapping that shows
0 as "DOWN", the override that gives one series a different axis, and the link that takes the reader from a bad value
to the logs behind it. Nothing in this layer changes the data, which is why it is the cheapest place to fix a confusing
panel and also the place where the most silent mistakes live: a missing unit, a threshold on the wrong scale or an
override that matches nothing all render without any error.
This page covers the options that nearly every visualization shares. The choice of the visualization itself is covered in Choosing a Visualization and, per panel, in Graphs and Charts, Stats, Tables and Widgets and Logs, Traces and Special Panels. Shaping the data before it reaches this layer is the job of Transformations and Expressions, and the dashboard around the panel is described in Building Dashboards. The running example is the Bookshelf service (see Metrics and Observability).
Where field configuration sits
A panel pairs a query with a visualization. Between them the data goes through transformations, and the result is a set of fields (columns, or the value column of each series). Field configuration is attached to those fields: defaults apply to all of them, and overrides apply to selected ones and win where they are set. The visualization finally draws the configured fields, together with its own options such as legend and tooltip.
In the panel editor the options pane lists these settings in groups. Search finds an option by name, and the All and Overrides tabs separate the defaults from the per-field rules. The editor also offers panel styles (preconfigured looks shown as preview cards) and, when a panel is first opened, visualization suggestions based on the query result. Applying a style changes only the fields the style defines and leaves field overrides alone. Panel styles were introduced as a public preview in Grafana 13.0.
Standard options
Standard options change how Grafana displays field data without changing the data itself. Set on the defaults they apply to every field; to treat one series differently use an override (below).
| Option | Behaviour |
|---|---|
Unit |
Applies to all fields except time. Without a custom prefix, suffix or SI unit Grafana auto-scales (for example bytes to
MiB). Custom units use the prefixes |
Min and Max |
Used in percentage threshold calculations (and by gauges and bar gauges to draw the range). Empty means automatic. |
Field min/max |
Computes the minimum and maximum per field instead of across all series and fields. |
Decimals |
Number of decimals shown. Empty lets Grafana truncate based on the value; set the unit to String to see all decimals. |
Display name |
The title of each field, with variable support (below). An expression that renders to an empty string falls back to the default naming. |
Color scheme |
Single color, Shades of a color, From thresholds (by value), Classic palette, Classic palette (by series name), Multiple continuous colors (by value, for example Green-Yellow-Red) and Single continuous color (by value, for example Blues). Some visualizations also ask whether to use the Last, Min or Max value. |
No value |
Text shown for empty or null values; the default is a hyphen. |
The display name accepts these variables:
| Variable | Expands to |
|---|---|
|
The field name plus its labels in braces. |
|
The field name only. |
|
The labels without the name. |
|
The value of one label key, here |
|
The label values, comma-separated, without keys. |
For a PromQL query such as sum by (uri) (rate(http_server_requests_seconds_count{application="bookshelf"}[5m])) the
default legend text is the whole label set. Setting the display name to ${__field.labels.uri} turns it into a route,
which is what the reader wants in a legend. Always set the unit: a latency panel without seconds (s) (or the
equivalent) forces every reader to guess whether 0.25 means milliseconds, seconds or a ratio, and an alert threshold
copied from the panel inherits that confusion (see
Designing Actionable Alerts).
Source: Grafana: Configure standard options (sections "Standard options" and "Display name").
Thresholds
Thresholds map numeric values to colours. They are the visual cousin of an alert condition: the dashboard shows where "bad" starts, and the alert rule pages somebody when it is reached.
-
The base threshold is the lowest step and acts as negative infinity, so it covers every value below the first defined threshold. It defaults to green. Grafana sorts the steps from highest to lowest.
-
Absolute mode compares against fixed numbers on the metric’s own scale (for example
0.01for a 1 percent error ratio). Percentage mode defines the steps relative to the minimum and maximum, so set Min and Max explicitly when you use it. -
The default thresholds are the base (green) and 80 (red), in absolute mode.
-
Show thresholds (Off, As lines, As lines dashed, As filled regions, As filled regions and lines, As filled regions and lines dashed) is available for bar chart, candlestick, time series and trend panels. It draws the steps on the chart itself, which makes the relation between the curve and its limit visible without colouring the series.
-
Since Grafana 13.3 a threshold step can refer to a dashboard variable (the 13.3 release notes list threshold variable interpolation as generally available), so one panel can take its limit from a variable such as an SLO target instead of a constant duplicated in many panels. The JSON model stores the expression of a step in
valueExpr.
Two practical rules follow. First, put the threshold on the scale that the unit displays: an error ratio of 0.01 is
shown as 1% only when the unit is "Percent (0.0-1.0)"; with the plain "Percent (0-100)" unit the same value shows as
0.01%. Second, keep the red value of a panel equal to the paging threshold of the matching alert, or the dashboard and
the pager will disagree during an incident.
Source: Grafana: Configure thresholds and Grafana: What’s new in 13.3 (section "Dashboards and visualizations").
Value mappings
Value mappings change the text or the colour that is displayed for a value, without altering the data. They are how
0 and 1 from an up metric become "DOWN" and "UP", and how a status code 503 becomes an eye-catching red "Unavailable".
| Type | Matches |
|---|---|
Value |
One exact value. |
Range |
A numeric range, with a beginning and an end. |
Regex |
A regular expression against the value as text. |
Special |
Null, NaN and boolean true or false (the data model also has |
A mapping has optional display text, an optional colour and, on canvas panels only, an optional icon. Two behaviours catch people out: a value mapping bypasses the unit formatting, so a mapped value ignores the decimals set in the standard options, and the colour is shown only where the visualization supports it (a table needs the cell type set to colored text or colored background; a time series ignores mapping colours). State timeline and status history panels depend on mappings (or thresholds) to give each state a colour and a legend entry.
Source: Grafana: Configure value mappings.
Overrides
An override is a rule with a matcher, which selects fields, and one or more properties to apply to them. Matchers are:
-
Fields with name (one field).
-
Fields with name matching regex (this selects fields; it does not rename them, which is the job of the "Rename by regex" transformation).
-
Fields with type (string, numeric, time and so on).
-
Fields returned by query (the refId, A, B, C).
-
Fields with values (all fields that satisfy a reducer condition such as Min, Max, Count or Total).
A property is named by its category and option, for example Standard options > Unit. Typical overrides for the Bookshelf service health dashboard are a different unit for the second query, a right-hand axis for the request rate next to a latency line, a fixed colour for the 5xx series, or hiding a series from the legend and tooltip. Clicking a series in the legend to isolate it creates an override automatically, which is a common reason for an unexpected override list on a panel somebody "only looked at".
Overrides apply to bar chart, bar gauge, candlestick, canvas, gauge, geomap, heatmap, histogram, pie chart, stat, state timeline, status history, table, time series, trend and XY chart. The documentation does not describe the evaluation order when several overrides match the same field, so keep overrides disjoint and avoid relying on order.
What can go wrong: a regex matcher that matches too much (the second example in the documentation shows a Celsius unit leaking onto a humidity field), and a matcher by name that stops matching when the display name or the query labels change. After renaming a series, re-check the Overrides tab.
Source: Grafana: Configure field overrides.
The same configuration as JSON
The dashboard JSON model stores defaults in fieldConfig.defaults and overrides in fieldConfig.overrides. The
schema defines unit, min, max, decimals, displayName, color, thresholds (with a mode of absolute or
percentage and sorted steps, the first having a null value), mappings, links, noValue and a plugin-specific
custom object. Each override has a matcher (with an id and options) and a list of properties (each with an id
and a value). Matcher ids include byName, byRegexp, byType, byFrameRefID and byValue. The fragment below is
the stat panel for the Bookshelf 5xx ratio in the classic JSON model; it is meant to be placed inside a panel object of
a dashboard that is provisioned or imported (see
Library Panels, JSON Model and Versions).
{
"type": "stat",
"title": "5xx ratio",
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"decimals": 2,
"min": 0,
"max": 1,
"noValue": "no data",
"color": { "mode": "thresholds" },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "orange", "value": 0.025 },
{ "color": "red", "value": 0.05 }
]
},
"mappings": [
{ "type": "special", "options": { "match": "null", "result": { "text": "no data", "color": "gray" } } }
]
},
"overrides": [
{
"matcher": { "id": "byName", "options": "Value" },
"properties": [ { "id": "displayName", "value": "5xx share of requests" } ]
}
]
}
}
Source: Grafana: dashboard kind schema (dashboard_kind.cue) and Grafana: field matcher ids. The JSON model itself is described in Grafana: View dashboard JSON model. In Grafana 13 the dashboard may be stored in the V1 or V2 resource schema; the field configuration keeps the same meaning, only the surrounding structure changes.
Legend and tooltip
Legend and tooltip are options of the visualization, but they belong with field configuration because they present the fields.
Legend:
-
Visibility, mode (List or Table), placement (Bottom or Right) and, for a right-hand legend, width.
-
Values: calculations such as Last, Mean, Max, shown next to each series. A table legend with Last and Max turns a busy chart into a readable summary, and in the table mode a click on a calculation header sorts the series (bar chart, histogram and time series only).
-
Limit caps how many series are listed before a "show all" link, which keeps a panel with hundreds of series usable (time series, bar chart, bar gauge, candlestick, histogram, pie chart, state timeline, status history, trend and XY chart). Series visibility adds a filter control (by name or by labels) on time series.
-
Clicking a series label isolates it, Ctrl or Cmd plus click adds a series back, clicking twice restores all, and clicking a colour bar changes the colour. Isolating creates an override.
-
Geomap and heatmap legends only support show and hide.
Tooltip:
-
Mode: Single (only the hovered series), All (all series, with the hovered one in bold) or Hidden. A field override can exclude a series from the tooltip.
-
With mode All: values sort order (None, Ascending, Descending) and Hide zeros.
-
Hover proximity (pixels), max width and max height (default 600 pixels). The heatmap adds Show histogram and Show color scale in Single mode.
A sorted "All" tooltip is the quickest way to find the worst route at a point in time; keep it on for incident dashboards.
Source: Grafana: Configure a legend and Grafana: Configure tooltips.
Data links and actions
A data link turns a value into a URL. It has a title, a URL (typing $ lists the variables), an "Open in a new tab"
switch and a "One click" switch (only one link per panel can use it, and only some visualizations support it). The link
can carry context from the clicked value, the series and the dashboard:
| Variable | Meaning |
|---|---|
|
The raw, displayed and numeric form of the clicked value. |
|
The timestamp of the clicked point, in epoch milliseconds. |
|
The field name, one label value and the series name. |
|
The value of another field in the same row. |
|
The time range (the last one expands to a string such as |
|
A dashboard variable as a query parameter, here a variable named |
|
All current dashboard variables. |
For Bookshelf, a data link on the "Slowest routes" table that opens the logs dashboard with the route and the time range
pre-selected is the one-click path from "this route is slow" to "show me its errors". Build the URL from the
${__url_time_range} and the variable of the target dashboard (variables are covered in
Variables), and test it by clicking, because a wrong variable name
fails silently by opening the target dashboard with defaults. Links between dashboards in general are covered in
Annotations and Links.
Actions are basic, unauthenticated API calls triggered from a panel, for example restarting a service. An action has a title, an optional confirmation message, a connection (direct from the browser or through a data source), a method (POST or GET), a URL, query parameters, headers, a content type and a body, and can take variables whose values are entered when it runs. Actions are supported on bar chart, candlestick, state timeline, status history, table, time series, trend and XY chart panels (the canvas has its own action support). Because the call is unauthenticated, the target must accept unauthenticated requests: treat every action as a button that anybody who can see the dashboard can press, and do not point one at anything that is not safe to trigger.
The panel inspector
The inspector is the debugging tool for a panel. Open it from the panel menu, or from the panel editor with Query inspector. It has these tabs:
-
Data: the raw query result with transformations applied (a Transform data switch shows the data with or without them). Overrides and value mappings are not applied unless you enable Formatted data. When a panel has several queries, Select result chooses one and Join by time shows them side by side. Download CSV exports the data, and Download for Excel formats the CSV for Excel.
-
Stats: how long the query took, how many queries were sent and how many rows came back. A panel that takes ten seconds is a query problem, not a visualization problem.
-
Query: the requests sent to the data source and the responses. Refresh re-runs the query.
-
Error (only when the query returned an error or notice): the full message. The icon in the top-left corner of a failing panel shows the highest severity, and Inspect opens the drawer.
-
JSON: the panel JSON, the panel data and the data frame structure, which is the quickest way to copy a working panel into provisioning files.
Source: Grafana: Panel inspector.
Verify it in the lab
In the lab (Hands-on Lab, profile grafana), open the "Bookshelf service
health" dashboard and edit the 5xx stat panel:
-
Remove the unit and confirm that the same value reads
0.0123instead of1.23%. Restore the unit. -
Set the thresholds to 0.025 and 0.05 as above and start the load generator with failing requests; the colour must turn orange and red at the values of the matching alert.
-
Add the "null" special mapping and stop Bookshelf; the panel should show the mapped text rather than a hyphen.
-
Open the inspector, Data tab, and compare the raw value with and without Formatted data.
-
Add a data link on a table and click it, then compare the target URL with the expression.
In the books
Salituro (Learn Grafana 10.x) covers thresholds, value mappings and overrides on stat, bar gauge and Geomap panels in Grafana 10; McCollam (Getting Started with Grafana) shows overrides and data links in Grafana 8, and Hernandez (Building IoT Visualizations using Grafana) uses overrides, mappings and data links on IoT dashboards. The concepts are unchanged. What has changed is the screens (options moved into the redesigned panel editor, with search, panel styles and the All and Overrides tabs) and the data: the Singlestat and Graph panels the older chapters build on no longer exist, so every setting in them is now a standard option of Stat and Time series. Threshold variable interpolation (13.3) and panel styles are newer than all of the books.