Annotation visibility toggle by clicking trace on legend

That’s a very clever workaround. Thank you @Emmanuelle!

I need to test the solution proposed since I can visualize 2 issues with it.

  1. The text is tied to a (x,y) coordinate and would get lost of the screen by zooming and panning across the plot
  2. Being tied to an (x,y) coordinate it can’t be freely placed on the plot.

Gonna try and see if I can make it work, I’m new to plotly and python… If I need further help I’ll post here again.

Thanks again