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

legendgroup visibility toggling does not work for shapes when showlegend is false

Open dmyronuk opened this issue 2 years ago • 1 comments

Toggling behavior of shapes is not consistent with that of traces in the legend.

https://codepen.io/dmyr/pen/abXmLPR

In the example, traces t0 and t1 are in legendgroup: "group1". t1 is hidden from the legend showlegend: false. Clicking t0 in the legend hides both t0 and t1 in the plot. This works as I would expect.

Shapes s0 and s1 are in legendgroup: "group2". s1 is hidden from legend showlegend: false. Clicking s0 in the legend only hides s0 while s1 is still visible in the plot. Expected: all members of the legend group should be hidden in the plot (both s0 and s1).

dmyronuk avatar Nov 02 '23 20:11 dmyronuk

I'm having the same issue. Have you found a solution?

wmachadoa avatar Dec 21 '23 12:12 wmachadoa