Black Lives Matter. Please consider donating to Black Girls Code today.

Click one legend and hide other legends

Hello! I would like to ask a question.

I have a groupby trace.

var traces = {
            x: x,
            y: y,
            type: 'scatter',
            mode: 'markers',
            transforms: [{
                type: 'groupby',
                groups: category,
                style: [...]

Like this:

If only I’d clicked ‘one’, it would hide one.
Now I want to click ‘one’ (keep ‘one’ showing) and hide others ( ‘two’, ‘three’, ‘four’, 'five).
Like this:

Any suggestions would be appreciated. Thank you!

Double-clicking on “one” should do exactly that

1 Like

How stupid I was.
Thank you very much.

1 Like