'use client'; import { Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Line, ComposedChart } from 'recharts'; import { Card } from '@/components/ui/Card'; interface VelocityData { week: string; completed: number; average: number; } interface VelocityChartProps { data: VelocityData[]; title?: string; } export function VelocityChart({ data, title = "Vélocité Hebdomadaire" }: VelocityChartProps) { // Tooltip personnalisé const CustomTooltip = ({ active, payload, label }: { active?: boolean; payload?: Array<{ dataKey: string; value: number; color: string }>; label?: string }) => { if (active && payload && payload.length) { return (

{label}

{payload.map((entry, index: number) => (

{entry.dataKey === 'completed' ? 'Terminées' : 'Moyenne'}: {entry.value} {entry.dataKey === 'completed' ? ' tâches' : ' tâches/sem'}

))}
); } return null; }; return (

{title}

} />
{/* Légende */}
Tâches terminées
Moyenne mobile
); }