How to color table gauge based on category

I have tabular data containing 3 fields: name, value and category.
I want to display this data using the table panel where the name is shown as text, the value shown as a gauge and the category is used to color the bars of the gauge.

I have control over the the specific category values and don’t want to show them explicitly so as a first step I replaced them by color names.

I then used a transform to try to apply the colors to the respective rows, but I only partially succeeded. It maps the actual numerical values to the colors and not the rows. This means that if I have 2 rows with the same value but a different category/color, they will show up as the same color.

Could someone point me in the right direction of how to do this properly?

Hi @mesuerebart, welcome to the community!

We have some examples of gauges on https://play.grafana.org.

I suggest looking there to see if there is one that demonstrates what you want to do. You can click edit on the panel to see how we’ve set them up (though you can’t save changes).

It would be helpful to the community to see a screenshot of the gauge you’re trying to create if you want more advice after looking there.

1 Like