Charts guide
RadarChart
Radar polygon on a polar grid.
Install
npx shadcn@latest add @foldcn/radar-chartRadarChart parameters
| Parameter | Type / props | Behavior |
|---|---|---|
data | ReadonlyArray<Datum> | Rows read by each polar series, unless the series supplies data. |
children | PolarChild[] | Pie, Radar, or RadialBar plus polar grid/axis descriptors. |
width / height | number | Defaults to 500 × 500 for Pie/Radar or 700 × 433 for RadialBar. |
cx / cy / innerRadius / outerRadius / startAngle / endAngle / barSize | number | percentage string | Polar position, radial extent, angles, and radial bar thickness. |
responsive | boolean | Fits the SVG to the available width. |
margin | Margin | Insets the PieChart plot and its radius. |
activeIndex / onActiveIndexChange | number | null / callback | Caller-owned active pie sector for hover shapes. |
title / className | string | Accessible SVG label and wrapper class. |
Child components
| Parameter | Type / props | Behavior |
|---|---|---|
Pie / Radar / RadialBar | dataKey, nameKey, cx, cy, innerRadius, outerRadius, startAngle, endAngle, paddingAngle, cornerRadius, fill, stroke, fillOpacity, label, background, data, colors, gradientColors, activeShape | Numeric series descriptor. Rendering support varies by chart; see the scope note below. |
PolarGrid | none | Concentric polygons and radial spokes in RadarChart. |
PolarAngleAxis | dataKey | Category labels in RadarChart. |
PolarRadiusAxis | domain, angle, ticks | Sets the radial domain and tick positions in RadarChart. |
Supports one or more polygons, polygon grid lines, angle labels, a specified radial domain, range bands, and example animation modes. Exit interpolation remains approximate.
Examples
The first example is open. Expand Source inside an example to view its code. Other examples load when opened.