Hi Fil, very cool notebook! I'm curious if there's any way to get transforms like this one to work across facets – it's something I noticed when trying to build something a little bit similar to this a while ago (highlighting all "related points" across all facets when hovering on a single point).
Oh, that's great! I started playing with it earlier today but didn't quite get to a working version yet since I got distracted with other stuff (will link here when I do.) I'm seeing what the simplest way is to use that approach but with a Plot.pointer, where each facet can subscribe to the "input" event, so all of them can update in response. I didn't realize until today that each facet's render function was called separately. 😄
Haven't figured it out yet – playing around here: https://observablehq.com/d/5a386abaa1549df2
Each line represents a particular latency quantile of a particular instance (machine). The lines are faceted by quantile, and I'd like to use a hover interaction to highlight all quantiles of a particular instance in red.
I'm using a "key" channel to link the data points across facets – any datum with the same key as the hovered point should be highlighted.
I think the translation that the pointer mark applies to the parent needs to be compensated for somehow: https://github.com/observablehq/plot/blob/e0bf09ea4dd537188c1fe11eca169d46bafb4fa8/src/interactions/pointer.js#L119C13-L119C15
A previous attempt (https://observablehq.com/d/5a386abaa1549df2#cell-7) was simpler but limited by the fact that only the hovered facet is re-rendered.
I wonder if it would be simpler to build this if the pointer mark re-rendered all facets, including those with an empty index set.
Here's an iteration on top of your idea, simplifying the setup to use a pointer transform for the event trigger, which controls the visibility of a separate mark by modulating opacity directly rather than re-rendering: https://observablehq.com/d/5a386abaa1549df2#s2