RadialBarChart

Concentric stroked-arc rings for comparing values against a shared scale.

Import

import { RadialBarChart } from '@matix/charts/radial-bar-chart';

Usage

Each datum draws as a ring — a low-emphasis full-sweep track behind a value-proportional arc. The first datum renders as the outermost ring, and every ring shares the same max scale.

Value arcs default to solid; light and gradient use the same categorical paint treatments as bar, pie, and donut charts.

Data for Sales, Marketing, Support
CategoryValue
Sales:82.
Marketing:64.
Support:45.

Gauge

A single datum with a wide startAngle/endAngle sweep reads as a gauge.

Data for CPU usage
CategoryValue
CPU usage:72.

API Reference

PropTypeDefaultDescription
datareadonly ChartDatum[]—Rings, first datum outermost; non-positive values render only the track
fillChartFillsolidValue-arc treatment: solid, light, or gradient
widthnumber—Controlled layout width; enables deterministic SSR
initialWidthnumber—SSR width hint replaced by client measurement
heightnumber280SVG height in px — width is measured from the container
maxnumber—Scale ceiling shared by every ring; defaults to the max positive value in data
startAnglenumber0Where every ring's sweep starts — degrees, 0 = 12 o'clock, clockwise
endAnglenumber270Where every ring's sweep ends, in degrees
showTooltipbooleantrueShow the hover tooltip (value and % of max)
showLegendbooleantrueShow the legend when there are 2+ rings
animatebooleantrueValue arcs draw in from the start angle
formattersChartFormatters—Format values and ring labels across tooltips, legends, and data
labelstring—Accessible name; defaults to the joined ring labels
labelsChartLabels—Screen-reader text of the data table and the legend, for translation
showLabelbooleanfalseRender label as a visible title above the plot
sxStyleXStyles—StyleX style override

ChartDatum

FieldTypeDescription
idstringStable data identity
labelstringLegend / tooltip label, falls back to id
colorIndexnumberPalette slot 0–7; defaults to input order
valuenumberRing magnitude; must be finite and positive to render a value arc

Accessibility

  • label provides the concise image name. description adds a richer summary through aria-describedby; consumer-owned text or a visible table can be linked with the aria-describedby prop.
  • Up to 20 rings receive a visually hidden native data table. accessibleData replaces that table with custom React content; pass null to suppress it. labels translates the table text and the legend name.
  • Ring marks remain aria-hidden; the chart is one image target and the table carries ring values.
  • The pointer tooltip is supplemental; the table carries values for assistive technology.
  • The legend pairs every palette swatch with a text label; it does not claim a second visual encoding beyond color.

Server rendering

Pass width for deterministic server-rendered SVG. Use initialWidth for responsive hydration from a server estimate. Without either prop, the wrapper reserves height before client measurement.