fix: show outage duration in the chart label
Build and Deploy / Lint, typecheck, test (push) Successful in 33s
Build and Deploy / Build & Push (push) Successful in 1m0s

The outage marker now reads "#N · 1h 28m" instead of just "#N" so the
duration is visible at a glance without hovering. Positioned above the
band ("position: top") rather than inside it — when the label string is
wider than the band, Recharts' insideTop placement silently drops the
ReferenceArea rect; placing the label above sidesteps that.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 19:16:24 -04:00
parent e888261ed9
commit b401f28fef
+3 -2
View File
@@ -88,11 +88,12 @@ export default function WaitTimeTodayChart({ samples, hasFastLane }: Props) {
strokeDasharray="3 3"
ifOverflow="extendDomain"
label={{
value: `#${o.n}`,
position: "insideTop",
value: `#${o.n} · ${formatOutageDuration(o.durationMin)}`,
position: "top",
fill: "#ff4d8d",
fontSize: 10,
fontWeight: 600,
offset: 4,
}}
/>
))}