The big numbers at the top of a dashboard are what people read first, and a wrong reduce calculation makes them lie.
All three visualizations reduce each series to one value and colour it with the thresholds from field options.
Value options apply to all of them. Calculation picks how a series becomes one number: Last * (last value, even if null), Last non-null, Mean, Max, Min, Total, Count, Difference, and more. For a range query showing "current error ratio" you want Last non-null; for "requests in the selected range" you want Total of an increase(), or better an instant query over $__range. With an instant query there is only one value and the calculation doesn't matter. Fields chooses which numeric fields are shown, and Limit caps how many series are displayed.
Stat shows the number, optionally with a sparkline (graph mode area) and a name. Colour mode is none, value, background gradient or background solid; text mode is auto, value, value and name, or name. Orientation and text size tune layouts with many instances; one stat per $instance with repeat is common. Newer versions can show a percent change against the first value of the range.
Gauge needs a meaningful min and max (set them explicitly, otherwise Grafana guesses from the data) and shows threshold markers and labels around the arc. Use it for things with a natural limit: disk, memory, queue capacity.
Bar gauge draws one horizontal or vertical bar per series, in gradient, retro LCD or basic display mode, with sorting and a shared max. It is the right choice for "top 10 pods by memory" or the fill level of many disks.
Example
# Stat: Error ratio (instant query, unit percentunit, thresholds green/orange 0.01/red 0.05)
sum(rate(http_requests_total{job="api", status=~"5.."}[5m]))
/ sum(rate(http_requests_total{job="api"}[5m]))
# Stat: Requests in selected range (instant, calculation irrelevant)
sum(increase(http_requests_total{job="api"}[$__range]))
# Gauge: Disk used, unit percentunit, min 0, max 1
1 - node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"}
# Bar gauge: Memory by pod, unit bytes, sort descending, instant
topk(10, sum by (pod) (container_memory_working_set_bytes{namespace="prod"}))Remember
- Stat, gauge and bar gauge reduce each series with a calculation; pick Last non-null or use instant queries
- Gauges need explicit min and max
- Bar gauge compares many series on one scale
Watch out for
- Leaving the calculation at Mean for a "current value" stat, so it shows the average of the last 6 hours.