This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.
About value mapping
Value mapping allows you to replace values or ranges in your visualizations with words or emojis.
Values mapped via value mappings will skip the unit formatting. This means that a text value mapped to a numerical value will not be formatted using the configured unit.
If value mappings are present in a panel, then Grafana displays a summary in the side pane of the panel editor.
Note: The new value mappings are not compatible with some visualizations, such as Graph (old), Text, and Heatmap.
Types of value mappings
Grafana supports the following value mappings:
- Value maps text values to a color or different display text. For example, if a value is
10, I want Grafana to display Perfection! rather than the number.
- Range maps numerical ranges to a display text and color. For example, if a value is within a certain range, I want Grafana to display Low or High rather than the number.
- Regex maps regular expressions to replacement text and a color. For example, if a value is ‘www.example.com’, I want Grafana to display just www, truncating the domain.
- Special maps special values like
NaN(not a number), and boolean values like
falseto a display text and color. For example, if Grafana encounters a
null, I want Grafana to display N/A.
You can also use the dots on the left as a “handle” to drag and reorder value mappings in the list.
Time series example
Here’s an example showing a Time series visualization with value mappings. Value mapping colors are not applied to this visualization, but the display text is shown on the axis.
Here’s an example showing a Stat visualization with value mappings. You might want to hide the sparkline so it doesn’t interfere with the values. Value mapping text colors are applied.
Bar gauge example
Here’s an example showing a Bar gauge visualization with value mappings. The value mapping colors are applied to the text but not the gauges.
Here’s an example showing a Table visualization with value mappings. If you want value mapping colors displayed on the table, then set the cell display mode to Color text or Color background.
Related Grafana resources
Unify your data with Grafana plugins: Splunk, MongoDB, Datadog, and more
Show how Grafana can be used to take data from multiple different sources and unify it, without disrupting the investments that are working today.
Getting started with Grafana Enterprise and observability
Join the Grafana Labs team for a 30-minute demo of how to get started with the Grafana Stack, so you can go from zero to observability in just a few minutes.