Skip to Content
kindui

Radar Chart

Compare a few profiles across the same set of measures.

Use a radar chart to compare two or three profiles, like products or teams, across five to eight measures on one shared scale. Each measure is a spoke, and each profile is a polygon.

Hover a spoke to compare both scores. Press a polygon or a legend item to highlight that product.

Installation

npx shadcn@latest add @kind-ui/radar-chart

Composition

RadarChart
├── RadarChart.Grid
├── RadarChart.AngleAxis
├── RadarChart.RadiusAxis
├── RadarChart.Series
├── RadarChart.Tooltip
├── RadarChart.Legend
└── RadarChart.Content

RadarChart holds the data, the series config and the accessible name, and draws only the parts you add. RadarChart.AngleAxis names the spokes from a row field, RadarChart.RadiusAxis sets the scale out from the center, and RadarChart.Grid draws the rings behind them. Add one RadarChart.Series per profile. RadarChart.Content places your own HTML next to the legend.

Usage

Scale

Each row is a spoke, and every profile reads its value from the same row. Give RadarChart.RadiusAxis a fixed domain, like [0, 100], and explicit ticks, so every spoke uses the same scale. Only compare measures with the same unit. Set outerRadius on the chart (the example uses "68%") to leave room for the spoke names.

Overlapping profiles need a see-through fill: set fillOpacity on each series, like 0.18. RadarChart.Grid takes radialLines={false} to hide the spokes and keep the rings.

Selection and Keyboard

With interaction={{ kind: "series", eligibleKeys }}, pressing a polygon or its legend item highlights that profile and dims the others, and screen readers hear "Highlighted Studio." Press it again, or press Escape, to clear it. Each profile is a button, so Tab reaches it and Enter or Space presses it.

Pass selected and onSelectionChange in interaction to control the highlight yourself. To hide and show profiles from the legend instead, see Legend.

Focus the chart and press the arrow keys to move between spokes, which shows every profile's score in the tooltip, and Escape to dismiss it.

Materials

Set material="clay" or "glow" on a series for a finish. The glow spreads past the polygon's edge, so it doesn't mark a score. See Materials.

Motion

With animate, the polygons grow out from the center when the chart mounts. Pass animate={{ revealDurationMs: 800 }} to change its length. When the reader prefers reduced motion, the polygons appear without growing. See Motion.

Loading

Set loading while the data is on its way. The chart keeps its size and shows a placeholder polygon that slowly changes shape, or holds still when the reader prefers reduced motion. Screen readers hear loadingLabel ("Loading chart" by default).

API Reference

RadarChart

Prop

Type

RadarChart.Series

Prop

Type

RadarChart and RadarChart.Series also take every prop of Recharts' RadarChart and Radar, like outerRadius, fillOpacity and dot.