# Annotation visibility toggle by clicking trace on legend

**URL:** <https://community.plotly.com/t/annotation-visibility-toggle-by-clicking-trace-on-legend/41687>\
**Category:** 📊 Plotly Python\
**Created:** [June 29, 2020, 1:08am UTC](https://community.plotly.com/t/annotation-visibility-toggle-by-clicking-trace-on-legend/41687 "2020-06-29T01:08:58Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![PL\_PUAR](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@PL\_PUAR](https://community.plotly.com/u/PL_PUAR)\
**Post date:** [June 29, 2020, 1:33pm UTC](https://community.plotly.com/t/annotation-visibility-toggle-by-clicking-trace-on-legend/41687/3 "2020-06-29T13:33:47Z")

</div>

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

---

_[View the full topic](https://community.plotly.com/t/annotation-visibility-toggle-by-clicking-trace-on-legend/41687)._
