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.
| Category | Value |
|---|---|
| Sales: | 82. |
| Marketing: | 64. |
| Support: | 45. |
Gauge
A single datum with a wide startAngle/endAngle sweep reads as a gauge.
| Category | Value |
|---|---|
| CPU usage: | 72. |
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
data | readonly ChartDatum[] | — | Rings, first datum outermost; non-positive values render only the track |
fill | ChartFill | solid | Value-arc treatment: solid, light, or gradient |
width | number | — | Controlled layout width; enables deterministic SSR |
initialWidth | number | — | SSR width hint replaced by client measurement |
height | number | 280 | SVG height in px — width is measured from the container |
max | number | — | Scale ceiling shared by every ring; defaults to the max positive value in data |
startAngle | number | 0 | Where every ring's sweep starts — degrees, 0 = 12 o'clock, clockwise |
endAngle | number | 270 | Where every ring's sweep ends, in degrees |
showTooltip | boolean | true | Show the hover tooltip (value and % of max) |
showLegend | boolean | true | Show the legend when there are 2+ rings |
animate | boolean | true | Value arcs draw in from the start angle |
formatters | ChartFormatters | — | Format values and ring labels across tooltips, legends, and data |
label | string | — | Accessible name; defaults to the joined ring labels |
labels | ChartLabels | — | Screen-reader text of the data table and the legend, for translation |
showLabel | boolean | false | Render label as a visible title above the plot |
sx | StyleXStyles | — | StyleX style override |
ChartDatum
| Field | Type | Description |
|---|---|---|
id | string | Stable data identity |
label | string | Legend / tooltip label, falls back to id |
colorIndex | number | Palette slot 0–7; defaults to input order |
value | number | Ring magnitude; must be finite and positive to render a value arc |
Accessibility
labelprovides the concise image name.descriptionadds a richer summary througharia-describedby; consumer-owned text or a visible table can be linked with thearia-describedbyprop.- Up to 20 rings receive a visually hidden native data table.
accessibleDatareplaces that table with custom React content; passnullto suppress it.labelstranslates 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.