Tap and legend behavior of Curve NdOverlay containers and Curve Overlay containers

I’ve been testing and comparing the capabilities of Curve NdOverlay containers and Curve Overlay containers. Specifically, I’d like these two functionalities:

  1. Apply a tap action on a curve to select it.

  2. Create an aggregated legend entry that can be clicked on to set/unset the curve transparency (the usual behavior with Holoviews/bokeh legend items).

With a Curve NdOverlay I’m achieving #1, but I’ve been unable to have the legend entry be anything other than one entry for each curve in the NdOverlay container. With a Curve Overlay, it’s the opposite: I can easily produce an aggregated legend entry, but I can’t achieve #1.

This contrast was touched on in a thread on StackOverflow over 4 years ago, but there the focus was on achieving #2. The person who posted the original message only brought up #1 at the end.

I’ve tried a number of things and at this point I’m almost resigned to not being able to have both of those capabilities. I could add code samples, but I figured I’d first post at a conceptual level and see if anyone recognizes this need, and a solution. Thanks!

I’m using the latest versions of all holoviz packages, specifically holoviews 1.20.2 and bokeh 3.7.2. I get the same behavior with older versions of holoviews (1.20.0) and bokeh (3.3.4).