Skip to content
WunderUI

Gauge Chart

Pro

Gauge for one value on its scale: semi-circle, speedometer, ring or segmented. The arc draws to the value and the number counts up.

Playground

Throughput

Throughput: 72 MB/s of 100 MB/s.
Throughput, data table
nameValue
Throughput72 MB/s

Installation

Gauge Chart comes with WunderUI Core and Pro, in the package from your plan. See the plans.

The charts live in their own entry point: import the chart, its card and its hooks from @wunderui/react/charts, not from @wunderui/react.

Then import what you need:

tsx
import {
  GaugeChart,
  GaugeChartProps,
  GaugeChartVariant,
} from "@wunderui/react/charts"

Then use it:

tsx
import { GaugeChart } from "@wunderui/react/charts"

export function CpuLoad() {
  return <GaugeChart value={68} caption="of 4.0 GHz" label="CPU load" />
}

Expected result: You see a half dial filled to 68 percent, with the number and caption under the arc.

When to use

Use Gauge Chart for

  • One value against its scale: load, memory, a score
  • A value that falls into bands (normal, high, critical)
  • A dial on a dashboard tile

Use something else for

States

Loading, empty and error keep the chart's size, so the card never jumps. Add a retry handler and the error state offers a Try again button.

CPU load

CPU load: 68% of 100%, of 4.0 GHz.
CPU load, data table
nameValue
CPU load68%

Needle and ticks

A needle and a scale of ticks can be added around the arc. When the value changes, the needle swings to it with a spring, the number counts to the new value and the colour follows.

Plan usage

API requests used: 74% of 100%, 742,180 of 1,000,000 requests.
API requests used, data table
nameValue
API requests used74%
Resets in 23 daysForecast 96%

Keyboard interactions

The gauge shows one value, so the plot has one stop and the live region reads that value on its scale.

TaborShiftTab
Moves focus to the gauge and away from it.
ArrowRightorArrowLeft
Land on the single value; the live region reads the label and the value on its scale ("CPU load: 64%"), never a share of a total.

Behavior and motion

What the chart does on its own and what the page decides.

One value
Set the value and, if needed, the scale (default 0 to 100). A label names the value and a caption adds a unit line; a value that isn't a finite number counts as empty.
Colour bands
The speedometer and segmented gauge colour the arc by band: green to 60 percent, yellow to 80, red above. Pass your own ranges, or one colour for the semi-circle and ring.
Needle and ticks
Needle and ticks shape the semi-circle and the speedometer. Min and max labels replace the texts at the ends of the scale.
Loading, empty and error
The chart keeps its size while loading, empty or failed, so the card never changes height. Add a retry handler to show a Try again button on error.
Size
The chart fills the width of its container, and you set the plot height. Text never scales: labels keep their size at every width.

Motion

The enter sequence and hover follow the library's motion tokens.

Draw-in
The arc draws to the value and the number counts up the first time the gauge is in view. A needle swings in from the start of the scale.
New value
When the value changes, the arc and number follow it and the needle re-aims with a spring.
Reduced motion
With reduced motion the enter sequence is off and the chart appears at once. Tooltip, crosshair and every state still work.

Anatomy

GaugeChart shows one value against its scale: a semi-circle, a speedometer with colour bands and a needle, a full ring or a segmented scale. The arc draws to the value on first view.

CPU load

CPU load: 68% of 100%, of 4.0 GHz.
CPU load, data table
nameValue
CPU load68%
  • Takes one value on a min to max scale. Options add a label, a unit caption, colour bands, a needle, ticks, segments and custom end texts.

  • data-slot="chart-plot"

    The focusable region. Arrow keys land on the single value and the live region reads its label and value on the scale, like CPU load: 64%.

  • data-slot="chart-marks"

    The track and the value arc, or the segments. On the speedometer the arc is split into colour bands, and a needle swings in from the start and re-aims with a spring when the value changes.

  • The number under the arc, which gets smaller with the gauge (20, 16 or 14 px), with the caption below and the min and max at the ends of the half arc.

  • Optional

    By default green up to 60 percent of the scale, yellow to 80, red above (Normal, High, Critical). The speedometer and segmented gauge colour by band; the semi-circle and ring use one colour.

  • data-slot="chart-tooltip"Optional

    The label and the value, with a dot in the band colour on the speedometer and segmented variants.

  • data-slot="chart-message"Optional

    A muted half ring (a full ring on the ring gauge) under the shimmer. A value that isn't a finite number counts as empty and reads no value.

  • The value as a one-row table for screen readers.

Best practices

  • Do

    Show the number and unit as text, not only as an arc. The arc is a glance; a caption like of 4.0 GHz carries the meaning for everyone.

  • Do

    Add bands only where a threshold has a decision attached, such as normal, high and critical. Bands without an action are noise.

  • Do

    Pair the colour with the band label in the tooltip and caption. Green, yellow and red alone fail for people who can't tell them apart.

  • Don’t

    Don't use a speedometer for values that only need a percentage. A ring gauge or ProgressChart takes less space and has no needle to misread.

  • Don’t

    Don't leave min and max implicit when the scale isn't 0 to 100. The default formatter adds a percent sign, so pass a value formatter for any other unit.

API reference

One table for GaugeChart, listing every prop. The ChartCard around it takes its own props (title, legend, periods, table and more), and the chart works without one.

Takes one value on a min to max scale. Options add a label, a unit caption, colour bands, a needle, ticks, segments and custom end texts.

PropTypeDefaultDescription
value requirednumber—
minnumber0
maxnumber100
variant"semi-circle-gauge" | "speedometer-gauge" | "ring-gauge" | "segmented-gauge""semi-circle-gauge"Figma variant. Default .
labelstring"Value"Name of the measured value (tooltip, table, screen readers).
captionstring—Small text under the value ("of 4.0 GHz").
bandsreadonly GaugeBand[]—Colour bands (speedometer, segmented): e.g. good / warn / critical.
color"indigo" | "blue" | "purple" | "green" | "orange" | "pink" | "yellow" | "red" | "grey"—Colour of the value arc (semi-circle, ring). Default indigo (ring: green).
needlebooleanfalse: a needle on the value (re-aims with a spring when the value changes).
ticksnumber—: tick marks inside the arc (number of intervals, e.g. 10).
valueFormatterChartValueFormatter—
heightnumber220
state"ready" | "loading" | "empty" | "error"—
animateboolean—
animationKeystring | number—
maxLabelstring—
minLabelstring—Texts at the two ends of the half arc (default: the formatted min and max).
onRetry() => void—Shows a Try again button in the error state and calls this when it is pressed.
segmentsnumber10: number of segments (default 10).
widthnumber—

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

MCPget_component("gauge-chart")
InstallIncluded in Core and Pro

The full library index for assistants is at /llms.txt.