diff --git a/src/app/dashboard/sites/[id]/certificate-chart.tsx b/src/app/dashboard/sites/[id]/certificate-chart.tsx index d20d31d..720880c 100644 --- a/src/app/dashboard/sites/[id]/certificate-chart.tsx +++ b/src/app/dashboard/sites/[id]/certificate-chart.tsx @@ -47,16 +47,19 @@ export function buildCertificateSeries( const money = (value: number) => `R${formatNumber(value, { notation: "compact", maximumFractionDigits: 1 })}`; -export function CertificateChart({ points }: { points: CertificatePoint[] }) { +/** One figure per chart: monthly bars against the left axis, running total line against the right. */ +export function CertificateChart({ points, metric }: { points: CertificatePoint[]; metric: "certified" | "retention" }) { + const color = metric === "certified" ? CERTIFIED_COLOR : RETENTION_COLOR; + const label = metric === "certified" ? "Certified invoice" : "Retention"; return ( -
- Bars show each month; lines show the running total (right axis). Certified invoice incl VAT, retention ex VAT. -
-+ Bars: each month (left axis) · line: running total (right axis). +
++ Bars: each month (left axis) · line: running total (right axis). +
+