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:
parent
e9d57b2082
commit
da1d86aba7
4 changed files with 191 additions and 4 deletions
5
web/src/lib/reach.ts
Normal file
5
web/src/lib/reach.ts
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue