Then I tried including a JS snippet in the HTML file, that (as far as I know) ought to activate upon a plotly_selected event. It looks like this:
Now graphDiv should be properly defined, but when I do lasso or rectangle selection on the graph, nothing is logged to the console, so I assume a ‘plotly_selected’ event has not been triggered.
Is there a way to check if an event has been triggered? But more importantly - how can one go about getting selected event data from a Plotly graph in a Flask app? A working example would be wonderful!