✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚾️ It's finally Baseball season! Root for the home team... & Register for our Sports Analytics Webinar!

Collect shape coordinates drawn by user in js

Hi !

I have a plot in js and I am looking for a way to let user draw a free shape one the plot (with lasso select or drawopenpath option) and collect coordinates of the shape.
I have seen that this is possible using Dash and callbacks but I cannot find a way to do it in js.

From the following example I am able to collect selected points with lasse but not actual coordinates of the shape. Lasso Selection | JavaScript | Plotly

Any suggestions ?

Thanks a lot