XYChart bar colors

Is it possible to change the color of each individual bar in the XYChart based on let’s say the key? I would like the change the color of the ‘Unplanned Downtime’ bar to red.

You could do it with css (injection or theme), but then you have to be sure it will always be the last column for that table.

}.psc-colorLastColumnRed [role="menuitem"]:last-of-type{fill:red;}{

If that’s all the data being shown, grouping the three of them in their own series would allow you to individually change the color of each.

I currently have them as a series but how do I go about changing the individual colours?

@Samg23 is recommending that you have three series. One for each column. Then you can set the color of each by setting the properties for each series in
series.0.column.appearance.fill.color .

1 Like

Yes @Transistor is correct, I should have been a tad more specific. Here’s where its located visually.

1 Like

@Transistor @Samg23 Thanks for the help guys.

1 Like