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
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
Sorry to ask again, any idea about this?
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).
1 Like
Thank you for the help, I'll work on it
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.

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.

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.