plot
plot copied to clipboard
Pointer, but that filters everything with a matching z value
For hovering a multi-series line chart, we don’t want to just highlight the current point; we want the highlight the entire line. I expect it’d be pretty easy to extend the current pointer interaction so that instead of just selecting a single index i, it filters the index to everything that has the same z value. Then you could apply this “pointerZ” interaction (name TBD) to a line mark, such that the line closest to the pointer is drawn in a different color.
(We probably also want an “exclude” mode for the pointer interaction to draw things differently when not pointed.)
A possible approach: https://observablehq.observablehq.cloud/pangea/plot/multiple-line-chart-hover