useRadarChart
const useRadarChart: () => RadarChartContextValue = radar.use;Defined in: packages/react/src/radar-context.ts:23
The radar's geometry — the <RadarChart> counterpart to usePitch().
pointAt(metricId, value) puts a mark on an axis using the same range
and flip as the shapes, so a benchmark or a league average lines up:
function Average({ values }: { values: Record<string, number> }) {
const { pointAt } = useRadarChart();
const points = Object.entries(values).flatMap(([id, v]) => pointAt(id, v) ?? []);
return <polygon points={points.join(" ")} fill="none" strokeDasharray="3 3" stroke="currentColor" />;
}Throws outside a <RadarChart>.