Open
Description
The double click event will trigger the single click event as well as reported in #1546. But the issue has been closed.
Here's the example showing the issue:
https://codepen.io/Lexachoc/pen/qEWZJxb
Only the single click event plotly_click
can access the data.
There are usecases to access the data points on double click e.g., in plotly/react-plotly.js#257.
It would be nice to allow access the data also on double click. And maybe also to avoid triggering a single-click event. (which will solve the issue report in #1546)
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Lexachoc commentedon Dec 8, 2024
I managed to implement this feature.

But since the double-click event is applied to the whole plot(?), the first response is null, which is fine since I can access the data from the second response.
I reused the
plotly_click
event, and trigger the secondplotly_doubleclick
manually, that's why only the second response has point data available.There's still an issue that the double click on points will force the plot to reset zoom. So I have to prevent the zoom reset if there's hover data.
I would like to hear what the Plotly team thinks about whether or not to add support for accessing data by double-clicking on points. (Of course, don't trigger zoom reset.)
Below is a usecase, double click on the points to show popup information of point (I use a toast for example):