plot icon indicating copy to clipboard operation
plot copied to clipboard

Pointer, but that filters everything with a matching z value

Open mbostock opened this issue 2 years ago • 1 comments

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.)

mbostock avatar May 17 '23 15:05 mbostock

A possible approach: https://observablehq.observablehq.cloud/pangea/plot/multiple-line-chart-hover

Fil avatar Sep 28 '24 07:09 Fil