Skip to content
Alea0.1
Pro
  1. Alea
  2. Components
  3. Charts
  4. RadialBarChart

ChartsAlea Pro

RadialBarChart

A few measures as concentric rings, each out of its own maximum: goals, quotas, completion.

import { RadialBarChart } from '@alea/pro';

Examples

Goals as rings

A few measures side by side; hover or use the arrows to read each.

Sprint goals
  • Design
  • Frontend
  • Docs
  • Tests

Tokens

The design tokens this component reads, with their value in the current theme. Override any of them to restyle it.

Color

  • --alea-focus…
  • --alea-text…
  • --alea-text-muted…

Type

  • --alea-font-family-body…
  • --alea-font-family-display…

Motion

  • --alea-motion-duration-fast…
  • --alea-motion-duration-slower…
  • --alea-motion-ease-out…

Props

RadialBarChart props

Progress of a few things side by side, as rings (goals, quotas, completion by team).

PropTypeDefaultDescription
datarequired{ label: string; value: number; max?: number | undefined; color?: string | undefined; }[]-One ring per item: its value out of max.
classNamestring-Extra class names for the root element.
descriptionReactNode-One sentence on what the data shows; read before the chart.
isLoadingboolean-Shows a shimmering placeholder while data loads.
showTablebooleantrueShows the table toggle. Default true.
sizenumber240Size in px. Default 240.
titleReactNode-The title shown above it and read by screen readers.
valueFormat((v: number) => string)-Formats values (axis, tooltip, table).

Specs

Generated from the source: the variants in the types, the states and tokens in the CSS, and the motion patterns that apply. The grids render the real component in both themes; the numbers are measured from the page.

States
Keyboard focus
Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-radial.alea-chart-svg.alea-radial-ring.alea-radial-arc.alea-pie-center.alea-pie-caption
Data attributes
data-dim

Accessibility

  • The chart is a figure named by its title and described by its description; the picture has a text summary.
  • Tab to the chart, then arrow keys move through the data and each value is announced; Escape leaves.
  • The table toggle shows the same data as a real table for everyone who can't use the picture.

Keyboard

KeyDoes
TabFocuses the chart
Left or Right arrowPrevious or next value
Home or EndFirst or last value
EscapeClears the selection

Do and don't

Do

  • Use it for a few goals, each out of its own maximum.
  • Keep it to four rings or fewer.

Don't

  • Don't compare rings by length: inner rings look shorter at the same value.
Tested with axe, keyboard and screen reader roles