# Legendgroup with sublist

**URL:** <https://community.plotly.com/t/legendgroup-with-sublist/4447>\
**Category:** plotly.js\
**Created:** [June 7, 2017, 3:10pm UTC](https://community.plotly.com/t/legendgroup-with-sublist/4447 "2017-06-07T15:10:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericksonla8](https://avatars.discourse-cdn.com/v4/letter/e/ba8739/32.png) [@ericksonla8](https://community.plotly.com/u/ericksonla8)\
**Post date:** [June 7, 2017, 3:10pm UTC](https://community.plotly.com/t/legendgroup-with-sublist/4447/1 "2017-06-07T15:10:44Z")

</div>

I see that you can make `legendgroup`s or keep all your traces as individual legend elements. Is it possible to combine them so I can either toggle by group or individual?

I’m imaging the legend would look like this:

```
◻︎Group A
     ◻︎A1
     ◻︎A2
☑︎Group B
     ☑︎B1
     ☑︎B2
☒Group C
     ◻︎C1
     ☑︎C1

```

Is this possible?

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [June 7, 2017, 3:33pm UTC](https://community.plotly.com/t/legendgroup-with-sublist/4447/2 "2017-06-07T15:33:31Z")

</div>

Not at the moment unfortunately
