Capturing JS callbacks in Python

I use plotly almost on a daily basis and I totally love it. Thanks to the devs.

Recently, I started working on some visualizations where I need to capture JS callbacks from the interactive plots. The events can be anything from click events to selection events (Laso/Rectangular selection), etc. I couldn’t find any examples on this apart from the one on click events.

Is there a wau to accomplish this within Python code?

Yes, this is basically what Dash is for: :slight_smile:

Thanks for the quick response. This looks good but can’t be done within plotly python package?

Dash is our recommended general-purpose solution, but if you’re working in a Jupyter environment, you can use the FigureWidget documented here Plotly FigureWidget Overview | Python | Plotly