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

As you can see on this exemple :

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 !

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