Charts guide

RadarChart

Radar polygon on a polar grid.

Install

npx shadcn@latest add @foldcn/radar-chart

RadarChart parameters

ParameterType / propsBehavior
dataReadonlyArray<Datum>Rows read by each polar series, unless the series supplies data.
childrenPolarChild[]Pie, Radar, or RadialBar plus polar grid/axis descriptors.
width / heightnumberDefaults to 500 × 500 for Pie/Radar or 700 × 433 for RadialBar.
cx / cy / innerRadius / outerRadius / startAngle / endAngle / barSizenumber | percentage stringPolar position, radial extent, angles, and radial bar thickness.
responsivebooleanFits the SVG to the available width.
marginMarginInsets the PieChart plot and its radius.
activeIndex / onActiveIndexChangenumber | null / callbackCaller-owned active pie sector for hover shapes.
title / classNamestringAccessible SVG label and wrapper class.

Child components

ParameterType / propsBehavior
Pie / Radar / RadialBardataKey, nameKey, cx, cy, innerRadius, outerRadius, startAngle, endAngle, paddingAngle, cornerRadius, fill, stroke, fillOpacity, label, background, data, colors, gradientColors, activeShapeNumeric series descriptor. Rendering support varies by chart; see the scope note below.
PolarGridnoneConcentric polygons and radial spokes in RadarChart.
PolarAngleAxisdataKeyCategory labels in RadarChart.
PolarRadiusAxisdomain, angle, ticksSets 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.

MathChineseEnglishGeographyPhysicsHistory0306090120
View the Recharts example