How to reset the clickData and back it to none when clicking out chart points?

Hi guys,

I’m implementing a scatter chart where the user can opt for 2 ways:

  • select only one point in the scatter (and I use clickData to filter my table)
  • or the user can select many points using the lasso (and I use selectedData to filter my table)

The problem I’m facing is that I can easily select and unselect the points when using the lasso option, but I can reset/clean the clickData when clicking out of the points; So I would like to know how can I manage it to work as expected?

I’m using as reference the same example of the dash docs: Part 4. Interactive Graphing and Crossfiltering | Dash for Python Documentation | Plotly

Any help will be very welcome.