plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Plotly Pie chart legend not work when I turn off all legend

Open DongVyThu opened this issue 2 years ago • 2 comments

Hi team! I think this is a bug in Plotly. When I turn off all legends and double-click on a legend after. it seems Legend's double-click event is not working. This error only occurs on pie charts while other chart types work normally. On Plotly website: [Pie](https://plotly.com/javascript/pie-charts/)

https://github.com/plotly/plotly.js/assets/142469586/4b0532ef-e892-4a14-b3c7-779cd639f810

This function also doesn't work on my project

Expected: If turn off all legends and double-click any legend item, all legends will active Thanks

DongVyThu avatar Jan 22 '24 03:01 DongVyThu

I would like to work on this issue. @alexcjohnson I could not find anywhere that assigning an issue is necessary. If so, could you please assign me?

IbraheemHaseeb7 avatar Jan 30 '24 04:01 IbraheemHaseeb7

Thanks for checking @IbraheemHaseeb7 - no assignment necessary, you can just submit a PR when you're ready!

@DongVyThu thanks for the report, definitely a bug, and you're exactly right about the desired behavior: double-click on any hidden item and ALL items are made visible.

One more detail: double-click on a visible legend item currently behaves correctly: if any other items are visible they are hidden; if no other legend items are visible then all items are shown. The problem is only if you double-click on a hidden item, which currently does nothing regardless of the state of all the other items.

alexcjohnson avatar Jan 30 '24 16:01 alexcjohnson