"use client"; import { RadarChart, Radar, PolarGrid, PolarAngleAxis, PolarRadiusAxis, ResponsiveContainer, Legend, Tooltip, } from "recharts"; interface RadarDataItem { platform?: string; dimension?: string; label: string; [brand: string]: string | number | undefined; } interface CompetitorRadarChartProps { data: RadarDataItem[]; brandName: string; competitors: { name: string; color: string }[]; } const DEFAULT_COLORS = [ "hsl(221.2 83.2% 53.3%)", "hsl(346.8 77.2% 49.8%)", "hsl(24.6 95% 53.1%)", "hsl(142.1 76.2% 36.3%)", "hsl(262.1 83.3% 57.8%)", ]; export function CompetitorRadarChart({ data, brandName, competitors, }: CompetitorRadarChartProps) { return ( [`评分: ${value}`, ""]} /> ( {value} )} /> {/* 己方品牌 - 使用主色调 */} {/* 竞品 */} {competitors.map((competitor, index) => ( ))} ); }