Single and comparative radar profiles built on TanStack Charts with polygon grids, labels, legends, points, and grouped tooltips.
npx shadcn@latest add @preskok/experimental-radar-chartimport { ExperimentalRadarChart } from "@/components/ui/preskok-ui/experimental-radar-chart"
const data = [
{ metric: "Reliability", current: 88, previous: 75 },
{ metric: "Security", current: 82, previous: 78 },
{ metric: "Performance", current: 74, previous: 68 },
]
export function ExperimentalRadarChartDemo() {
return (
<ExperimentalRadarChart
data={data}
dataKey="metric"
grid={{ shape: "polygon", ticks: 4, valueLabels: "visible" }}
valueAxis={{ domain: [0, 100] }}
valueFormatter={(value) => `${value}%`}
config={{
current: { label: "Current", color: "var(--chart-1)" },
previous: { label: "Previous", color: "var(--chart-2)" },
}}
/>
)
}valueAxis.domainRadar charts work best with a small, fixed set of compatible dimensions. Keep their units, direction, and domain consistent, and avoid ranking profiles by apparent filled area.