# Double click on legend is not working (2 traces pie chart)

**URL:** <https://community.plotly.com/t/double-click-on-legend-is-not-working-2-traces-pie-chart/54329>\
**Category:** plotly.js\
**Created:** [June 30, 2021, 7:17am UTC](https://community.plotly.com/t/double-click-on-legend-is-not-working-2-traces-pie-chart/54329 "2021-06-30T07:17:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heexos](https://avatars.discourse-cdn.com/v4/letter/h/54ee81/32.png) [@Heexos](https://community.plotly.com/u/Heexos)\
**Post date:** [June 30, 2021, 7:17am UTC](https://community.plotly.com/t/double-click-on-legend-is-not-working-2-traces-pie-chart/54329/1 "2021-06-30T07:17:36Z")

</div>

Hi,  
As you can see on this exemple :  
https://codepen.io/heexos/embed/preview/Pomwmbq?default-tabs=js%2Cresult&height=300&host=https%3A%2F%2Fcodepen.io&slug-hash=Pomwmbq  
The double click is not working on this kind of exemples. I got 2 traces, that I display depending on the selected option with the buttons. The 2 traces has some data in common.  
Some of my tests even append a “undefined” in hiddenlabels, but i can’t reproduce that in codepen, maybe a browser specific issue…  
Does someone has a fix for that?  
Thanks !

---

<div class="post-metadata">

**Author:** ![Heexos](https://avatars.discourse-cdn.com/v4/letter/h/54ee81/32.png) [@Heexos](https://community.plotly.com/u/Heexos)\
**Post date:** [July 2, 2021, 6:31am UTC](https://community.plotly.com/t/double-click-on-legend-is-not-working-2-traces-pie-chart/54329/2 "2021-07-02T06:31:15Z")

</div>

Hey,  
I didn’t resolve my problem since, does someone has a solution?  
Thanks
