Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 37 ยท Panels and Visualizations

Thresholds, Value Mappings, Overrides and Other Panel Types

Customize Grafana panels with thresholds, value mappings, field overrides and color schemes, then survey other visualizations: bar chart, pie chart, heatmap, logs, state timeline and more.

Once a panel shows the right data, three features decide whether people understand it: thresholds (when is it bad?), value mappings (what does this code mean?) and overrides (this one series is special). This lesson covers all three and ends with a catalog of the other visualizations so you can pick the right one.

Thresholds

A threshold is a list of steps. The first (Base) has no value and applies to everything below the next step. Common setup for latency in seconds: Base green, 0.5 orange, 1 red.

  • Mode: Absolute (real values) or Percentage (relative to min/max).
  • Thresholds affect colors of Stat, Gauge, Bar gauge, Table cells, and can draw lines or regions on Time series.
  • The same steps drive alert-like visuals but do not send notifications. For that you need alerting.

Color schemes

Under Standard options > Color scheme: Single color, From thresholds, Classic palette (one color per series), Shades of a color, and continuous gradients like Green-Yellow-Red (by value). Choose a scheme that fits the data: classic palette for categories, thresholds for health, continuous gradients for magnitude. Prefer palettes that remain distinguishable for color-blind viewers and add labels, not color alone.

Value mappings

Mappings replace raw values with display text and color:

Type Example
Value 0 -> "Down" (red), 1 -> "Up" (green)
Range 0 to 50 -> "Low"
Regex ^5\d\d$ -> "Server error"
Special null -> "No data", NaN, true, false, empty

Mappings are applied in order and the first match wins. They are essential for status codes, booleans and enumerations that a database or exporter stores as numbers.

Overrides

An override has a matcher (which fields) and properties (what to change):

  • Matchers: Fields with name, Fields with name matching regex, Fields with type (number, string, time), Fields returned by query (A, B...), Fields with value (reducer based).
  • Properties: any standard or panel option such as unit, color, axis placement, line style, cell type, hide in legend, hide from tooltip.

Examples: set errors to red on the right axis; make every field matching /.*_bytes$/ use the bytes unit; hide the Time column in a table.

Overrides are evaluated top to bottom, and a later override wins for the same property.

Stand-in: mappings and thresholds together

The first matching mapping wins, otherwise thresholds color the number. This stand-in applies both.

JS Stand-in: apply mappings, then thresholds

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Stand-in: overrides by matcher

JS Stand-in: field overrides

Press Run (or Ctrl + Enter) to see the console output here.

No output.

A catalog of other visualizations

Panel Use it for
Bar chart Compare categories (revenue per region); can be stacked or grouped
Pie chart / donut Parts of a whole with few slices (under about six)
Histogram Distribution of values (request size)
Heatmap Density over time and value buckets, such as latency distributions from histogram buckets
State timeline Discrete states over time (up/down, deploy phases)
Status history Many items by time as colored cells
Logs Log lines from Loki or Elasticsearch
Traces Waterfall view of Tempo or Jaeger traces
Node graph Nodes and edges, e.g. service dependencies
Geomap Data points on a world map
Candlestick, XY chart, Trend Financial data and non-time-based relationships
Text Markdown or HTML notes, headings, instructions
Dashboard list / Alert list / News Navigation and status widgets
Canvas Free-form layouts with elements bound to data
Flame graph Profiling data from Pyroscope

Rule of thumb: trends over time use Time series (or State timeline for states); a single current value uses Stat/Gauge; ranking uses Bar chart/Bar gauge; exact detail uses Table; distributions use Histogram/Heatmap.

Choosing quickly

Which panel fits the question?

Over time Time series, state timeline
Right now Stat, gauge
Compare Bar chart, bar gauge
Exact detail Table, logs

Start from the question, then pick the panel.

1 / 2

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. In value mappings, what happens when two mappings match the same value?

    Mappings are evaluated in order and the first match is used.
  2. 2. Which override matcher targets every field whose name ends with _bytes?

    A regex matcher such as /.*_bytes$/ selects all matching fields.
  3. 3. Which visualization suits discrete states like up/down over time?

    State timeline draws colored bands for each state across time.
  4. 4. Do thresholds send notifications?

    Thresholds are visual. Alerting is configured separately.

Summary

  • Thresholds color values; mappings translate codes; overrides customize specific fields.
  • Choose color schemes that suit the data and stay accessible.
  • First matching mapping wins; later overrides win over earlier ones.
  • Pick the panel from the question: trend, now, compare, detail, distribution.
  • Visual thresholds are not alerts.

Next: The Grafana Query Editor, Query Options and Query Inspector