Format all monetary amounts as 1'000-separated integers and round amount inputs to nearest 1'000
Deploy App / deploy (push) Successful in 43s

This commit is contained in:
2026-07-08 20:31:34 +02:00
parent a1e689167c
commit 3b68ff8319
7 changed files with 110 additions and 43 deletions
+2 -5
View File
@@ -11,6 +11,7 @@ import {
XAxis,
YAxis,
} from "recharts";
import { formatChf } from "@/lib/format";
import type { PlanComputed } from "@/lib/calculations";
export interface TimelineSeries {
@@ -67,11 +68,7 @@ export function WealthChart({ series }: { series: TimelineSeries[] }) {
tick={{ fontSize: 11 }}
tickFormatter={(v) => Intl.NumberFormat("de-CH", { notation: "compact" }).format(v)}
/>
<Tooltip
formatter={(v) =>
typeof v === "number" ? v.toLocaleString("de-CH", { maximumFractionDigits: 0 }) : v
}
/>
<Tooltip formatter={(v) => (typeof v === "number" ? formatChf(v) : v)} />
<Legend wrapperStyle={{ fontSize: 12 }} />
{primary.boundaries.slice(1).map((b) => (
<ReferenceLine key={b.year} x={b.year} stroke="#a1a1aa" strokeDasharray="2 2" />