Graph Centred Around A Non-Zero Value?


I’m trying to make a graph that “centres” around 10,000 (rather than zero). The graph is of barometric pressure, so values below 10,000 are “low” pressure, and those above are “high” (and the measurements vary by a few thousand in either direction). It would be useful to have the graph shading reflect “high” and “low”, but show the actual value on the graph (as opposed to subtracting 10,000 from each measured value).

Is there a way to do something like this?


Could you manually draw up what it is you are aiming for and post a screen shot.

Akao what version of grafana and what data source is it?

I’m using Grafana 9.3.1 (self hosted), and InfluxDB 2.5.1 as the data source.

A picture would make a lot of sense. Please excuse my gimping here:

Hopefully it’s clear what I’m going for here - exactly like a “Centered Zero” graph, but instead of centring on zero, to centre on 100,000 (or whatever other number). Thus, the graph shading goes “upwards” when a trace goes below 100,000, or shades below the trace when it is above 100,000. Does this make any sense?

1 Like

Let’s start with the centering first

What if configure the chart to have min 99700 and max 100200. Try and post back

Assuming you mean “soft min” and “soft max” - yes, If I put those in, then the Y-axis always shows the range between min and max, and the trace is then scaled as necessary over that. This all seems fine to me :slight_smile:

1 Like

Good now on to shading check this out


Shading works too - BUT the shading always goes to the bottom of the graph (or to zero, whichever comes first). I can colour the shading differently as the trace goes above and below 100,000, but that’s not really what I’m after.

Can I make the shading “stop” at 100,000?

look at value mapping which has a range config

I’ve tried some ranges in Value Mappings. I can make it say “High” in the axis, and I can make the colour in the tooltip change depending on the value. I’ve also tried some Thresholds, so can draw a line across my 100,000 point (which is actually quite useful), but I can’t find a way to affect the shading (other than change it’s opacity or colour or whatever).

What am I missing?