"use client"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from "recharts"; interface SimpleStatsChartProps { title: string; data: Array<{ name: string; value: number; }>; color?: string; } export function SimpleStatsChart({ title, data, color = "hsl(var(--primary))" }: SimpleStatsChartProps) { return ( {title} { if (value >= 1000000) return `${(value / 1000000).toFixed(1)}M`; if (value >= 1000) return `${(value / 1000).toFixed(1)}K`; return value.toString(); }} /> [ value >= 1000 ? `${(value / 1000).toFixed(1)}K tokens` : `${value} tokens`, 'Tokens consommés' ]} /> ); }