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"
|
strokeDasharray="3 3"
|
||||||
ifOverflow="extendDomain"
|
ifOverflow="extendDomain"
|
||||||
label={{
|
label={{
|
||||||
value: `#${o.n}`,
|
value: `#${o.n} · ${formatOutageDuration(o.durationMin)}`,
|
||||||
position: "insideTop",
|
position: "top",
|
||||||
fill: "#ff4d8d",
|
fill: "#ff4d8d",
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
|
offset: 4,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user