Radial chart
Values as arcs round a centre, as rings against their goals that lap past them, or as a gauge with a needle. The ring under the pointer stays bright, and a new value sweeps from where the ring is.
Examples
Goals
Rings against goals of their own, with maxKey. Past its goal a ring laps round again, and a shadow under its end shows the overlap. Another day sweeps each ring from where it is, and the centre gives the ring under the pointer as a share of its goal.
Gauge
startAngle and endAngle make an arc, RadialChartNeedle points at the value and RadialChartRange writes the ends. Past high the arc and value turn red, as the Meter does.
Labels
On three quarters of a circle, RadialChartLabels names each ring where it starts. With no domain, the rings share one that runs to a round value past the highest.
Progress
One thin ring with its share in the centre: a step through a task.
Installation
npx shadcn@latest add https://kinoui.com/r/radial-chart.json- Files
lib/dates.tslib/chart-math.tslib/chart-scale.tslib/chart-frame.tslib/refs.tslib/reduce-motion.tslib/resize.tslib/live.tsxlib/chart-live.tslib/chart-live-clock.tsxlib/scroll.tslib/swap.tsxlib/popup.tslib/glide.tsxlib/keys.tsxcomponents/kino/kbd.tsxcomponents/kino/tooltip.tsxlib/cut.tsxlib/number-format.tslib/roll.tsxlib/run-progress.tscomponents/kino/animated-number.tsxlib/announce.tscomponents/kino/spinner.tsxcomponents/kino/button.tsxlib/controllable.tslib/chart-root.tsxlib/chart-state.tslib/chart-agent.tslib/chart-base.tsxlib/chart-cartesian-reader.tslib/chart-cartesian.tsxlib/chart-list.tsxlib/chart-list-reader.tslib/chart-tree-reader.tslib/chart-flow-reader.tslib/chart-grid-reader.tslib/highlight.tscomponents/kino/chart.tsxlib/chart-centre.tsxlib/chart-radial.tsxlib/placeholder.tscomponents/kino/radial-chart.tsx- Packages
@ui-sdk/core@ui-sdk/reactclass-variance-authorityd3-arrayd3-shape- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
The CLI keeps any of these colours your project already has, such as the chart colours shadcn init writes. To use Kino’s, set them in your global CSS:
:root { --chart-1: oklch(0.42 0.1 248); --chart-2: oklch(0.53 0.12 222); --chart-3: oklch(0.6 0.11 185); --chart-4: oklch(0.65 0.17 132); --chart-5: oklch(0.72 0.154 106.7); --chart-accent: oklch(0.795 0.171 71.2);}.dark { --chart-1: oklch(0.6 0.15 255); --chart-2: oklch(0.7 0.13 222); --chart-3: oklch(0.79 0.13 185); --chart-4: oklch(0.82 0.15 128); --chart-5: oklch(0.72 0.154 106.7); --chart-accent: oklch(0.795 0.171 71.2);}API reference
RadialChart
The chart: a <figure> named by label, which fits the arc to its plot and holds the chart’s parts. Other props go to the figure. Each row is a ring, outermost first, with a track along the whole arc; the props from data to messages are the ones every chart takes.
RadialChartCentre
What sits in the hole: the value and name of the ring under the pointer, the keys or picked, rolling in as it changes. With a needle, it sits under the hub; on an arc open at the bottom, above the centre. Other props go to its layer.
RadialChartLabels
Each ring’s name, value or share where the ring starts, in the open part of an arc, moving with its ring. A label that would cross a ring, a label further out or the chart’s edge is skipped. Other props go to its layer.
RadialChartNeedle
A needle from a hub at the centre, pointing at the first ring’s value, as a gauge’s. It turns in step with the arc and never past its ends. Other props go to its layer.
RadialChartRange
The domain’s ends under the arc’s ends. Nothing on a whole circle, whose ends meet. Other props go to its layer.
ChartTooltip
What is under the pointer or the focus, in the chart’s own words: on a chart with series, the values of the category or the time. It shows at once and slides from one to the next. Other props go to its popup.
ChartLegend
A toggle for each series that shows and hides it. Pointing at one, or focusing it, brings its series forward. Takes position, top or bottom.
ChartGroup
Charts inside it share the category under the pointer or the focus, by its key, so pointing at a day on one lights it on all of them.
Data attributes
CSS variables
Accessibility
- The plot is one stop in the tab order: a slider over the rings. Left and Right step through them, outermost first, Home and End go to the first and last, and each ring’s name, value and share are read as the slider’s value.
- A hidden table holds every ring’s value and share, for screen readers and for copying.
- Loading, an error and new data are announced in a status region.
- Each ring is named in the legend, the tooltip and its label, so none relies on colour alone; a ring that warns crosses the notch that marks where warning starts. Forced colours draw each ring in a system colour.
- When the system asks for less motion, the arcs, laps and needle land at once, and only colours fade.
- The chart is a
<figure>named bylabel. - Escape closes the tooltip and nothing above the chart.
- The legend’s toggles say whether each series shows. When every series is hidden, a button shows them all again and takes the focus.
For agents
What an agent reads on this example with snapshot(), and the actions it can call with act().
The Agent bridge page sets up snapshot() and act() in your app.