# XY Chart and selectedHighlightColor problem

**URL:** <https://forum.inductiveautomation.com/t/xy-chart-and-selectedhighlightcolor-problem/93325>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 17, 2024, 9:37am UTC](https://forum.inductiveautomation.com/t/xy-chart-and-selectedhighlightcolor-problem/93325 "2024-07-17T09:37:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [July 17, 2024, 9:37am UTC](https://forum.inductiveautomation.com/t/xy-chart-and-selectedhighlightcolor-problem/93325/1 "2024-07-17T09:37:34Z")

</div>

Good morning,  
in a XY Chart I have the columns with different background colors. When I click on them I retrieve the data from the `selection > data` property and everything works fine.

My problem is that I can't manage the `selectedHighlightColor` property, I want that when I click of the columns the background don't change, how could I do this?

I try to get the background color and then set it back to the `selectedHighlightColor` property with the `Change Script` in the `data` property but it doesn't work

```python
self.parent.parent.getChild("FlexRightTab").getChild("Label").props.text = self.props.selection.data[0]['columnColor']
self.props.selection.selectedHighlightColor = self.props.selection.data[0]['columnColor']

```

Thank you

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [July 25, 2024, 1:52pm UTC](https://forum.inductiveautomation.com/t/xy-chart-and-selectedhighlightcolor-problem/93325/2 "2024-07-25T13:52:21Z")

</div>

Sorry to ask again, any idea about this?

---

<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:** [July 25, 2024, 2:17pm UTC](https://forum.inductiveautomation.com/t/xy-chart-and-selectedhighlightcolor-problem/93325/3 "2024-07-25T14:17:41Z")

</div>

> I have the columns with different background colors.

I think you mean different **fill** colors.

Try creating a property binding on `PROPS.selection.selectedHighlightColor`:

Set the property binding to copy the fill color:  
`this.props.series[0].column.appearance.fill.color`

I had to turn Designer Preview mode off and on again for the change to take effect. If you're going to change it on the fly in the browser client you may need to refresh something to get it to take effect. I don't know what (at the moment).

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [July 29, 2024, 7:14am UTC](https://forum.inductiveautomation.com/t/xy-chart-and-selectedhighlightcolor-problem/93325/4 "2024-07-29T07:14:42Z")

</div>

Thank you for the help, I'll work on it

---

<div class="post-metadata">

**Author:** ![simeonw](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@simeonw](https://forum.inductiveautomation.com/u/simeonw)\
**Post date:** [March 3, 2026, 1:23am UTC](https://forum.inductiveautomation.com/t/xy-chart-and-selectedhighlightcolor-problem/93325/5 "2026-03-03T01:23:30Z")

</div>

I know this is an old post, but someone else might find this useful.

We use the XY chart to display timelines and we wanted the selected segments to remain the same color when clicked; the selection was only used to open a detailed popup for that segment anyway.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/1/b186a254eeb50972e31ef2a976a686411ee38588.png)

Using a binding to set the _ **selectedHighlightColor** _ to the _**selection.data[0].color**_ and then triggering a full refresh of the chart worked, but it caused the chart to flash, which we didn’t want.

It turns out, if you set the _ **selectedHighlightColor** _ to **null** , it doesn’t change the color of the selected segment.

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

Maybe not the most robust solution, as it probably just causes the function for setting the color to fail, but it gave us the desired result.
