Grafana with different colours on single graph?

Hi,

I am using HomeAssistant with Grafana and it’s really nice and smooth.

One question did come up recently:
I have a Grafana panel with a single data source. It is an index which indicates quality. So good quality is <25 and poor quality is >250.

Is there a way to tell Grafana to change the colour display above or below these values?
If it is below 25 the graph should be green, above 250 red and below yellow.

Any hints?

Thanks!
/KNEBB

Not the line, no. You can change the graph background colour to mark the levels though:

Untitled

Hi,

this will relate to the current value only, right?

Not what I want, yes. But I’ll have a look. Thanks so far.
Might it be an option to define a max/min value and add the same datasource triple times?

/KNEBB

I don’t know what you mean by that.

They are background graph colours you set the levels for. Like this (these are the thresholds set in my last image):

Ahhhh… got it now! Thought it will change background based on current value.

Ok, thanks- that is a really good alternative for my wishes. I will do this.

Thanks again!

/KNEBB

Actually you can do what you want now, see: Ability to color lines by threshold values - #7 by grant2 - Singlestat Panel - Grafana Labs Community Forums

Thanks a lot!

This is indeed what I was looking for.

Unfortunately it does not work as I expected it to do:

However, if I configure it to show the thresholds, it is acceptable.

In any case better than before.
If you have an idea why it is showing this strange ways, let me know.

/KNEBB

Under Standard Options, set the color scheme to “From thresholds(by value)”:

Untitled

Thanks again for pointing me to the configuration item. Got it now finally!

Working like a charm: