Collapsible legend items to hide/show traces in legend-group

Hi there,

I am using go.Scatter3d() to plot vertices and edges of a 3D shape. The edges are added to the figure as individual traces. I would like to group all the edge traces in a single collapsible legend label “Edges”, such that the list of individual edge traces can be shown/hidden by clicking on the “Edges” legend label and collapsing/uncollapsing it.

I have tried grouping all the edge traces and showing only one of them in the legend, but this method does not allow to see the whole list. I would like to be able to show the list on click, and to be able to show/hide the edge traces within the “Edges” legend group individually.

Does Plotly allow to do this at the moment?

Thanks,

MG