Change single color by variable

Hi everybody. A little digression.

I created a variable in the variables tab and named it my_color, it is a custom type with a value of 24c38e. I want to use this variable as ${my_color} in visualizations, for example, “bar chart”. But there I only see a selection of pre-set colors or a selection on the palette, I can’t insert a variable like ${my_color} and there’s no place for it.

Is it even possible to change the color using variables?

The idea is that the color can be changed to any color quickly

Example, it was

became

Thanks for any advice

Hello, check if this helps:

1 Like

as far as I know you cant change colors based on variable in the stock bar chart but you can if you use Business Chart plugin

docu: Business Charts | Volkov Labs

implementation in grafana
chrome-capture-2024-7-16

With transformation mentioned above that is achievable with stock bar gauge:

bar gauge

2 Likes

Thank you all for the answers. I used @ebabeshko solution