The bottom example on https://plot.ly/javascript/text-and-annotations/#styling-and-formatting-annotations shows how to click to plot an annotation at a given point. I use this a bunch on my current plot, which has a large number of traces that are selectively toggled on/off by users.
Is there a way that I can optionally cause turning off/hiding a trace to also hide or remove the clicked annotations for that specific trace?
Edit: Just found this issue on Github, https://github.com/plotly/plotly.js/issues/664