What Grafana version and what operating system are you using?
Grafana Cloud
What are you trying to achieve?
I want to color the bar chart so that values within a threshold are green, and values below or above that range are red.
How are you trying to achieve it?
I have a Trino query that returns a table with 1 row and 2 columns: min and max. I used a ‘config from query results’ to set these as the thresholds. I set the base color to red, the low threshold to green, and the high threshold to red. I set color scheme to ‘from thresholds by value’.
What happened?
All bars are colored red.
What did you expect to happen?
Bars between the low and high threshold should appear green.
I can display the thresholds as dashed lines, so I can tell they are recognized at least.
If I remove the ‘config from query results’ and set the thresholds directly, the colors work as expected, with any gradient mode, with or without centered zero.
That’s interesting, but I need the range to change dynamically based on query results. I see value mapping is an option for that transformation, but I can’t tell how it’s supposed to work. It seems like it would only set a specific value, not a range.