Radar Chart
Documentation Index
Fetch the complete documentation index at: /llms.txt. Use this file to discover all available pages before exploring further.
Radar charts with filled and lines variants, gradient colors, and glow effects
Installation
Usage
<EvilRadarChart /> is the root of a composible compound component. Every visual part (<EvilRadarChart.PolarGrid />, <EvilRadarChart.PolarAngleAxis />, <EvilRadarChart.Tooltip />, <EvilRadarChart.Legend />, and the <EvilRadarChart.Radar /> series) composes as a child โ render only what you need.
import { EvilRadarChart } from "@/components/evilcharts/charts/recharts-radar-chart";
import { type ChartConfig } from "@/components/evilcharts/ui/recharts-chart";const data = [
{ skill: "JavaScript", desktop: 186, mobile: 80 },
{ skill: "TypeScript", desktop: 305, mobile: 200 },
{ skill: "React", desktop: 237, mobile: 120 },
{ skill: "Node.js", desktop: 173, mobile: 190 },
{ skill: "CSS", desktop: 209, mobile: 130 },
];
const chartConfig = {
desktop: {
label: "Desktop",
colors: { light: ["#3b82f6"], dark: ["#60a5fa"] },
},
mobile: {
label: "Mobile",
colors: { light: ["#10b981"], dark: ["#34d399"] },
},
} satisfies ChartConfig;
<EvilRadarChart data={data} config={chartConfig}>
<EvilRadarChart.PolarGrid />
<EvilRadarChart.PolarAngleAxis dataKey="skill" />
<EvilRadarChart.Legend />
<EvilRadarChart.Tooltip />
<EvilRadarChart.Radar dataKey="desktop" variant="filled">
<EvilRadarChart.Dot variant="colored-border" />
<EvilRadarChart.ActiveDot variant="default" />
</EvilRadarChart.Radar>
<EvilRadarChart.Radar dataKey="mobile" variant="filled" />
</EvilRadarChart>Interactive Selection
Set isClickable on a <Radar /> or <Legend /> to toggle selection by clicking. The root's onSelectionChange callback fires on every selection change:
<EvilRadarChart
data={data}
config={chartConfig}
onSelectionChange={(selectedDataKey) => {
if (selectedDataKey) {
console.log("Selected:", selectedDataKey);
} else {
console.log("Deselected");
}
}}
>
<EvilRadarChart.PolarGrid />
<EvilRadarChart.PolarAngleAxis dataKey="skill" />
<EvilRadarChart.Legend isClickable />
<EvilRadarChart.Tooltip />
<EvilRadarChart.Radar dataKey="desktop" variant="filled" isClickable />
<EvilRadarChart.Radar dataKey="mobile" variant="filled" isClickable />
</EvilRadarChart>Loading State
Pass isLoading to the root to show an animated loading skeleton while your data is being fetched.
<EvilRadarChart data={[]} config={chartConfig} isLoading>
<EvilRadarChart.PolarGrid />
<EvilRadarChart.PolarAngleAxis dataKey="skill" />
<EvilRadarChart.Legend />
<EvilRadarChart.Tooltip />
<EvilRadarChart.Radar dataKey="desktop" variant="filled" />
<EvilRadarChart.Radar dataKey="mobile" variant="filled" />
</EvilRadarChart>Examples
Radar charts in different configurations.
Lines Variant
Set variant="lines" to show only the outline without fill โ clearer for comparing multiple datasets.
Circle Grid
Set gridType="circle" to use circular grid lines instead of the default polygon grid.
Gradient Colors
Glowing Radars
Set isGlowing on a <Radar /> for a soft glow. Each radar controls its own glow independently.
API Reference
A root container plus a set of composible parts, each documented below.
The root container. Owns the data, shared context, and loading skeleton. All other parts render as its children.
A single radar series. Each <Radar /> generates its own gradients and glow filter under a unique id, so radars never collide on styles. Compose <Dot /> and <ActiveDot /> inside for point markers.
Configuration slots inside a <Radar />. <Dot /> styles the resting markers; <ActiveDot /> styles the active marker. Neither renders anything on its own.
The polar grid lines. Defaults to a dashed polygon grid and forwards every Recharts PolarGrid prop.
The angular category axis โ the labels around the chart's perimeter. Hidden while loading.
The radial value axis โ the scale from center outward. Hidden while loading.
The hover tooltip. Dims unselected series based on the chart's selection. Hidden while loading.
The series legend. With isClickable, each entry toggles selection of its series. Hidden while loading.