fix: show outage duration in the chart label
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:
@@ -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,
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user