Skip to content
Protocore Design Systemv1.6.9

/// Charts

RadialProgress

A single-value radial gauge — a hand-rolled SVG ring with an accent (or tone) value arc and a mono tabular centre label.

import { RadialProgress } from "@protocore/pds";
View as Markdown

Import path

Unlike the recharts wrappers, RadialProgress is a hand-rolled SVG gauge with no chart dependency, so it ships from the main entry:

import { RadialProgress } from "@protocore/pds";

Basics

Pass a value (and max, defaulting to 100). The arc fills clockwise from 12 o'clock in the accent — the reserved brand signal for a single live figure — over a faint track, with a mono tabular percentage in the centre. The ring is the one place a radius is on-brand: it's a gauge, not a control.

Tones, captions, and custom labels

A tone swaps the accent arc for a status colour when the gauge itself reports health (danger for near-full disk, success for uptime). Add a mono-UPPER caption under the number, and override formatValue to print a fraction (3/5) or a raw value instead of a percentage.

When to use it

Use RadialProgress for a *single* value against a bound where the compact ring earns its place — a KPI tile, a quota gauge, the centre of a DonutChart, a sync/uptime readout. It draws the eye to one number.

For a value in a row or a dense list, a thin ProgressBar reads faster and packs tighter. For a whole split into parts, use a PercentageBarChart. RadialProgress is determinate only — for unknown-duration work use an indeterminate ProgressBar or a Spinner.

Usage

Do

  • Use it for one headline value against a clear bound.
  • Keep the accent arc for neutral progress; switch to a `tone` only when the value reports health.
  • Pair it with a mono caption so the number's meaning is unambiguous.
  • Nest it in a DonutChart's hole to show a part-to-whole plus its total.

Don't

  • Don't use it for indeterminate work — it's determinate; reach for a Spinner.
  • Don't crowd a table row with rings; a ProgressBar packs tighter.
  • Don't spend the accent arc on a status meaning — use a `tone` for that.
  • Don't rely on the arc alone; the centre label carries the exact value.

Accessibility

  • Exposes `role="progressbar"` with `aria-valuemin`/`aria-valuemax`/`aria-valuenow`; pass a `label` describing what it measures.
  • The SVG ring and centre label are decorative (aria-hidden) — the value is announced through the progressbar semantics.
  • Out-of-range values are clamped into `[0, max]` so the arc and reported value stay honest.

RadialProgress props

PropTypeDefaultDescription
captionReactNodeOptional mono-UPPER caption rendered under the value.
classNamestring
formatValue((value: number, max: number) => ReactNode)Format the centre value label. Defaults to a rounded percentage of `max`.
labelstringAccessible label describing what the gauge measures.
maxnumber100Upper bound of `value`. Defaults to `100`.
showValuebooleantrueRender the centre value label. Defaults to `true`.
sizenumber120Diameter in px. Defaults to `120`.
styleCSSProperties
thicknessnumber8Ring stroke width in px. Defaults to `8`.
toneenumSwap the accent arc for a status tone.
value *numberCurrent value.

Related

  • ProgressBarA thin track that fills to value/max, or sweeps indeterminately when value is omitted.
  • PercentageBarChartA single 100%-stacked horizontal distribution bar with sharp, tokened segments and a swatch/label/percent legend.
  • PieChartA monochrome-plus-signal pie chart with sharp sectors and a custom legend; DonutChart is the same wrapper with a ring cutout.
  • MetricDeltaA compact directional change indicator — a ▲▼ glyph plus a signed magnitude, toned by direction.