show tooltip when hovering over selected points on scatter plot
Hello,
I’ve encountered an issue when using Plotly’s scatter plot. When I select specific points on the scatter graph and then try to hover over those selected points, the tooltip fails to appear. This behavior is inconsistent with how tooltips normally function on the plot, where they display the relevant data for each point when hovered over.
Steps to reproduce:
- Create a scatter plot with multiple data points.
- Select one or more points on the graph.
- Hover over the selected points.
- Notice that the tooltip does not appear for the selected points.
you can find an example in Plotly's documentation :
https://plotly.com/javascript/line-and-scatter/
The behavior change was introduced in #6243 commit 4138cf040cc5a0e661781b64aaeafc53b3961f3f when the 'pointer-events' was changed from stroke to all which disabled the tooltip
@gvwilson I just ran into this too. Might not be super high-priority, but I'd argue it's a bug rather than a feature request. It's at least an unintended change (thanks for tracking it down @munteannatan!) but also the selected points are clearly the ones you care most about so it's frustrating to not be able to see their hover information.
Changing pointer-events was important to the new selection behavior added in #6243, so that selections can be dragged. I suspect the solution will be to explicitly forward mousemove events (and I suppose enter and exit - maybe everything except mousedown?) in the selection element to the subplot drag/hover handing element.