RadialBar

Concentric radial bars (a circular gauge family) — each datum is a ring whose sweep is proportional to its value.

Category: chart · WCAG 2.1-AA · chart, radial, gauge, progress, data-viz

Props

PropTypeDefaultDescription
dataRadialBarDatum[]One ring per datum: { id, label, value, color? }.
titlestringChart title (also used as aria-label).
descriptionstringSubtitle below the title.
sizenumberSquare shorthand (width === height). Explicit width/height win.
widthnumberFixed SVG width in px. ⚠ **Omit for a responsive chart** — the chart fills and tracks its container via a ResizeObserver; there is no correct pixel number in a responsive grid. A fixed width is clamped to the container (max-inline-size: 100%) so it can never overflow its card, but it also stops the chart growing. `useChartSize` is NOT needed for this — charts call it internally.
heightnumber300SVG height in px. Unlike `width`, height does NOT track the container — this is the knob you set to change the chart's aspect.
maxnumberDomain top — the value a full sweep represents. Defaults to the largest datum.
sweepnumber270Sweep angle in degrees (270 = a gauge arc; 360 = a full ring).
centerValuestringText in the hole.
centerLabelstringCaption below centerValue.
centerSlotReactNodeArbitrary hole content; wins over centerValue/centerLabel.
tooltipbooleanEnable hover tooltip.
legendbooleanShow ring legend.
classNamestringAdditional CSS class names merged onto the root element.
plainbooleanfalseMarks only — no legend. For micro/inline charts.

Design tokens

When to use

When not to use

Examples

Goal progress rings

import { RadialBar } from '@cascivo/charts'

<RadialBar
  title="Quarterly goals"
  max={100}
  centerValue="72%"
  centerLabel="On track"
  data={[
    { id: 'rev', label: 'Revenue', value: 84 },
    { id: 'nps', label: 'NPS', value: 61 },
    { id: 'ret', label: 'Retention', value: 72 },
  ]}
/>

Related components

← Back to docs