# Select grouped chart on single click

**URL:** <https://community.plotly.com/t/select-grouped-chart-on-single-click/28592>\
**Category:** plotly.js\
**Created:** [September 12, 2019, 8:12am UTC](https://community.plotly.com/t/select-grouped-chart-on-single-click/28592 "2019-09-12T08:12:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![venug\_pal](https://avatars.discourse-cdn.com/v4/letter/v/df788c/32.png) [@venug\_pal](https://community.plotly.com/u/venug_pal)\
**Post date:** [September 12, 2019, 8:12am UTC](https://community.plotly.com/t/select-grouped-chart-on-single-click/28592/1 "2019-09-12T08:12:43Z")

</div>

[https://codepen.io/venug\_pal/pen/eYOroRQ](https://codepen.io/venug_pal/pen/eYOroRQ)

I have grouped bar chart displayed in horizontal. What I want is when I click on bar of the y axis it should display its respective group.

 ![grouped_bar_chart](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/3/3850147fe19e26767cb07a9e8a96d2cd262e8041.png)

In the above Image when I click on Orange bar of D axis.It should also select Blue bar of the D axis.

---

<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:** [September 17, 2019, 5:34pm UTC](https://community.plotly.com/t/select-grouped-chart-on-single-click/28592/2 "2019-09-17T17:34:27Z")

</div>

Hmm. How is this question different from

> [@Multi select bar on click of the grouped chart](https://community.plotly.com/t/multi-select-bar-on-click-of-the-grouped-chart/28734):
>
> How to select two bars at the same time which are grouped. Ex: . When clicked on blue or orange bar of D axis it should select two lines on a click.

?

---

<div class="post-metadata">

**Author:** ![venug\_pal](https://avatars.discourse-cdn.com/v4/letter/v/df788c/32.png) [@venug\_pal](https://community.plotly.com/u/venug_pal)\
**Post date:** [September 17, 2019, 5:51pm UTC](https://community.plotly.com/t/select-grouped-chart-on-single-click/28592/3 "2019-09-17T17:51:19Z")

</div>

Hey Etiene,

Thank you so much for the response. I wasn’t able to delete or edit the old question.

Thank you once again.
