How to get selected image annotation in a callback

Small question, after drawing an image annotation in Dash (like here: Image Annotations | Dash for Python Documentation | Plotly), is it possible such that when the user “selects” on an annotation, we can get the annotation data in a callback? Right now I can only get the annotation data in a callback if the I modify the annotation (i.e. drag a corner etc)


Hi @snickers2524 welcome to the forums.

There is no built in function or property you can use, unfortunately. Not sure how the JS exactly works, but I imagine something like a event listener on the client side, but I’m not sure if you can access it.