feat: improve balance calculations in statistics page and charts with enhanced formatting for large values
This commit is contained in:
@@ -90,7 +90,18 @@ export function BalanceLineChart({
|
||||
className="text-xs"
|
||||
interval="preserveStartEnd"
|
||||
/>
|
||||
<YAxis className="text-xs" tickFormatter={(v) => `${v}€`} />
|
||||
<YAxis
|
||||
className="text-xs"
|
||||
width={80}
|
||||
tickFormatter={(v) => {
|
||||
// Format compact pour les grandes valeurs
|
||||
if (Math.abs(v) >= 1000) {
|
||||
return `${(v / 1000).toFixed(1)}k€`;
|
||||
}
|
||||
return `${Math.round(v)}€`;
|
||||
}}
|
||||
tick={{ fill: "var(--muted-foreground)" }}
|
||||
/>
|
||||
<Tooltip
|
||||
formatter={(value: number) => formatCurrency(value)}
|
||||
contentStyle={{
|
||||
|
||||
Reference in New Issue
Block a user