I’m using Grafana version 9.4.7 on Windows 11.
-
I am working on plotting timeseries data from the Google BigQuery tables using GBQ plugin, which is working fine.
-
Additionally, I am also plotting dynamic thresholds data on the graph, which is being fetched from GBQ tables.
-
I want to change the color of the timeseries graph, if it violates the thresholds.
-
So if the normal color of the timeseries graph is green, it should change to Orange, if it violates first threshold (t1) and should turn red if the second threshold (t2) is violated. Remember that both t1 and t2 are dynamic.
There are three cases of threshold violations:
-
When the timeseries graph exceeds the threshold, it’s a violation and the color of that specific part should turn red. Examples are mean-absolute-error etc.
-
When the timeseries graph drops below the threshold, it’s a violation and the color of that specific part should turn red. Examples are accuracy etc.
-
When the timeseries graph exceeds the upper threshold OR drops below the lower threshold, it’s a violation and the color of that specific part should turn red.
I have used Transforms to highlight thresholds.
-
Then, I have added overrides as follows:
1- Fields with name : timeseries
2- Standard Options > Color Scheme: From thresholds (by value)
3- Graph Style > Gradient Mode > Scheme
Also overrides for thresholds:
1- Standard Options > Color Scheme: Single Color
But it partially serves the purposes, for only Case 1 of threshold violation.