I am building an interactive dashboard using plotly and ipywidgets and the dashboard contains multiple FigureWidget objects as well as dropdowns, buttons etc. Unfortunately I have run into a frustrating issue with the drag select tool.
I have included
.on_selection events for all of my scatterplots and use these selection events to prompt other calculations. Because the drag select functionality is one of a few different ways to filter data in this dashboard, I would like the lines which bound the selection to disappear after the selection is made. If this does not happen, then the dashed lines persisting on the plot are quite misleading for the user.
I think in essence I want to have the behaviour of a double click post selection happen automatically. I have found an example which implements some of the behaviour I need in plotly.js at this link (https://community.plotly.com/t/how-can-i-remove-plotly-select-box-after-the-selection-is-done/2716/7) but I do not know how to apply this to python.
Any help to replicate the above example in python would be much appreciated.
Thanks in advance,