Radar chart
Several values of each series on axes round a centre, one shape per series. A dot on each shape marks the axis under the pointer and turns round with its name, and new data moves each point along its spoke from where it is.
Examples
New data
Two teams on the same six axes. Another quarter moves each point along its spoke from where it is, and a dot on each shape marks the axis under the pointer, turning round with its name.
Value axis
RadarGrid shape='circle' draws the rings as circles, RadarValueAxis writes their values up the top spoke, and dots marks every point.
Own scales
maxKey puts each axis on a scale of its own, here each goal’s target, so goals in different units share one shape and the rings read as shares.
Outlines
fill={false} draws only the outline and dashed sets last quarter apart, so two shapes compare without one hiding the other.
Installation
npx shadcn@latest add https://kinoui.com/r/radar-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-radial.tsxlib/placeholder.tscomponents/kino/radar-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
RadarChart
The chart: a <figure> named by label, which places each axis round the centre and holds the chart’s parts. Other props go to the figure. The axes are the categories and each series is a shape; the props from data to messages are the ones every chart takes.
Radar
One series’ shape, in its colour. It steps back while another series is brought forward. Other props go to its layer.
RadarGrid
A ring at each of the value axis’s ticks and a spoke out to each axis, under the shapes. The lit axis’s spoke stands out and turns with it. Other props go to its layer.
RadarAxis
Each axis’s name past the outer ring, against it and upright. Long names wrap, narrower when neighbours would meet, and the grid shrinks to keep them inside the chart, so like every part the range reaches for, it sits straight inside the chart, or in a fragment there, in a file marked use client. The lit axis’s name sits in the pill. Other props go to its layer.
RadarValueAxis
Each ring’s value up the top spoke, sliding to its ring’s new place when the range changes. Nothing with maxKey. 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.
ChartTooltipContent
The category’s name, then a row for each shown series, with its change when the chart is ordered. On an x of times, a series with no row at that time shows its nearest one within half the smaller of its own usual gap and the chart’s rows’, with that row’s time, and is left out past it. Takes index, total and hideLabel.
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 axes. Left and Right step round them, Home and End go to the first and last, and each axis’s name and every series’ value are read as the slider’s value.
- Up and Down bring the series further out or further in on that axis forward, as the legend does, and only its value is read, so a screen reader hears the move; a step past the outermost or innermost brings every series back. The tooltip marks the series brought forward.
- A hidden table holds every axis’s values, for screen readers and for copying.
- Loading, an error and new data are announced in a status region.
- Each series is named in the legend and the tooltip, so none relies on colour alone;
dashedandpatternsset shapes apart further. Forced colours draw each series in a system colour. - When the system asks for less motion, the shapes, the spoke and the dots land at once, and only their 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.