3

Currently using plotly.js wrapped inside the react-plotly library for a web application. Plotly has a behaviour where double click events trigger a reset of the plot (specifically selections within scatter plots are reset, which is the behaviour I wish to replicate). Is there a way to programmatically trigger this double click event or else to explicitly reset the selection?

I haven't been able to locate any info in the public docs and triggering a double click event on the plot does not appear to have any effect (i.e. calling dispatchEvent(new Event('dbclick')))

1 Answer 1

0

Depending on which plot type you're using, you can modify the selectedpoints attribute within the traces to reset the selection. Set it to an empty list.

https://plotly.com/javascript/reference/scatter/#scatter-selectedpoints

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.