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.
- 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).
| Prop | Type | Default | Description |
|---|---|---|---|
datarequired | { label: string; value: number; max?: number | undefined; color?: string | undefined; }[] | - | One ring per item: its value out of max. |
className | string | - | Extra class names for the root element. |
description | ReactNode | - | One sentence on what the data shows; read before the chart. |
isLoading | boolean | - | Shows a shimmering placeholder while data loads. |
showTable | boolean | true | Shows the table toggle. Default true. |
size | number | 240 | Size in px. Default 240. |
title | ReactNode | - | 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
| Key | Does |
|---|---|
| Tab | Focuses the chart |
| Left or Right arrow | Previous or next value |
| Home or End | First or last value |
| Escape | Clears 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.