How to get different colour for each legend in a bar chart

Grafana version : v9.2.4

Bar graph that I created has same colour to each lengend

I want to have different colour to each legend. Something like this

How to achieve this on grafana dashboard UI

What are the x-axis labels in your graph? Days of the week? I think you could change the colors by having separate 5 queries (or however many datapoints you are displaying).

Can you give me any example on how to write separate query for each legend?

What is the current query you are using the generate the (all green color) graph?

This is a very simple group by query I used. This data is of AWS cloud trail. So I have used groupby on AWS account. So the bar graph is showing count of event from each AWS account (first 5)

Hi @sayalibankar05,

Not sure if you have already found a solution. In case not, then you can use override for each of your queries (which is displayed as a legend) and select a custom color for each of them.

image

Let us know if this helps.

1 Like