Every chart gets a snapping crosshair, tooltips, and 24px hit targets.
From dataviz (references/interaction.md).
Sweep the pointer across both charts.
pointer-events: stroketabindex="0"svg.addEventListener("pointermove", (e) => showAt(Math.round((e.offsetX - left) / step)));
svg.addEventListener("keydown", (e) => e.key === "ArrowRight" && showAt(i + 1));
Click the ringed dot in each hit test.
| Hit test | Hits | Misses | Rate |
|---|---|---|---|
| Painted 8px | 0 | 0 | – |
| 24px area | 0 | 0 | – |
| Nearest point | 0 | 0 | – |
const hit = nearest(points, pointer, 40); // -1 past the cap
Hover the tiny March, August and November bars.
pointer-events: visiblePainted| Month | Tickets |
|---|
<g class="col" tabindex="0"><rect class="hit" height="{plotHeight}" /><path class="bar" /></g>
name.textContent = label;
Readers aim at a date or a bar, never at the ink. Big targets and focus make every value reachable.