plotly / plotly.js

Open-source JavaScript charting library behind Plotly and Dash
https://plotly.com/javascript/
MIT License
17.08k stars 1.87k forks source link

fix to allow you to add fake selections #7164

Closed alexcjohnson closed 1 month ago

alexcjohnson commented 1 month ago

This is useful when you have selectedpoints (based on a different plot perhaps) but no selections, and you still want a doubleclick to clear selectedpoints and generate plotly_selected and plotly_relayout events.

Calling this a bugfix because before this change, an invalid selection object will throw an error here because we convert it to null in the supplyDefaults step:

https://github.com/plotly/plotly.js/blob/f6253deb1f6a4abba43afd2ab159760a4b2d62dd/src/components/selections/defaults.js#L25-L32

archmoj commented 1 month ago

@alexcjohnson could you please rebase it on top of 2.35.2 so that I could release it as part of upcoming 2.35.3?