# How do we select a Complete Bar in X,Y Chart?

**URL:** <https://forum.inductiveautomation.com/t/how-do-we-select-a-complete-bar-in-x-y-chart/103724>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [March 14, 2025, 7:15pm UTC](https://forum.inductiveautomation.com/t/how-do-we-select-a-complete-bar-in-x-y-chart/103724 "2025-03-14T19:15:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farhan\_Basheer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/farhan_basheer/32/66759_2.png) [@Farhan\_Basheer](https://forum.inductiveautomation.com/u/Farhan_Basheer)\
**Post date:** [March 14, 2025, 7:15pm UTC](https://forum.inductiveautomation.com/t/how-do-we-select-a-complete-bar-in-x-y-chart/103724/1 "2025-03-14T19:15:24Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/8/684887128bb5d7df7edbc733e3c7531f6f0f9312.png)

I am trying to figure out a way to select the complete bar instead of a part of it.  
So basically what I want to do is when i click on the bar the whole bar should get selected.  
Upon researching I have found out that if I click on the one of the section it creates a data array of objects in the `props.selection` property and each object has a unique `uid` and `seriesid`. I have also figure out the id pattern for these 2 properties based on the values of the objects.  
For example:  
I have clicked on the upper part of the bar and the `uid` is `id-183837` now the same property for the second object should be `uid[0] - 141 = uid[1]` same is the case for `seriesid`: `seriesid[0] - 19 = seriesid[1]`

Now the issue is the lower part of the bar doesn't get's selected when we have the right second object in the data array.

Is there a workaround to highlight the other part of the bar.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 14, 2025, 7:32pm UTC](https://forum.inductiveautomation.com/t/how-do-we-select-a-complete-bar-in-x-y-chart/103724/2 "2025-03-14T19:32:20Z")

</div>

It looks like the `selection.data` properties are one-way from the graph into the property. Writing to the property doesn't get sent back to the chart.

What are you hoping to do with the complete bar selection?

Related: [XY Chart - Selection of Points](https://forum.inductiveautomation.com/t/xy-chart-selection-of-points/84126/).

---

<div class="post-metadata">

**Author:** ![Farhan\_Basheer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/farhan_basheer/32/66759_2.png) [@Farhan\_Basheer](https://forum.inductiveautomation.com/u/Farhan_Basheer)\
**Post date:** [March 14, 2025, 7:43pm UTC](https://forum.inductiveautomation.com/t/how-do-we-select-a-complete-bar-in-x-y-chart/103724/3 "2025-03-14T19:43:30Z")

</div>

When I select a bar, I am populating a table.  
Both sections of the bar has the same data, and I was wondering if both has the same data then we should be able to select the complete bar instead of selecting one section at a time.
