web: reach-over-time chart with playhead, slice 5 of M3

Hand-rolled SVG as decided: dashed percent grid, one cumulative curve
per panel in its accent color, end labels via the shared formatPct, and
a playhead line with per-curve dots synced to the global round. The
cumulative-at-round counting moved into lib/reach.ts so the panel stats
and the chart cannot disagree.
This commit is contained in:
Justin Visser 2026-06-10 17:39:21 +02:00
parent e9d57b2082
commit da1d86aba7
4 changed files with 191 additions and 4 deletions

5
web/src/lib/reach.ts Normal file
View file

@ -0,0 +1,5 @@
// Cumulative reach at a playback round, shared by the panel stats and the
// reach chart so both always agree with the network picture.
export function reachedCountAtRound(reachedAtRound: number[], round: number): number {
return reachedAtRound.filter((reachedAt) => reachedAt >= 0 && reachedAt <= round).length
}