Dear community,
-
What Grafana version and what operating system are you using?
10.0.10, Linux -
What are you trying to achieve?
I want to plot data as a statetimeline in different colors without hardcoding the value/color.
For example i have a column “Order Number”. The Order-Number is generated randomly and i want to show it on a statetimeline. The Order-Numbers should be separated in different colors. For now i can’t use that without hardcode the values in “value-mappings”. I have a solution for TimescaleDB which is not that efficient. But i’d like to have a solution for MSSQL as well.
The “Order-Number” is just an example and mostly the plotted values are strings.
Result Now:
Result i want to achieve: (In this image i use the Timescale-DB workaround).
- How are you trying to achieve it?
With “Group By” i achieved a workaround for Timescale-DB.
SELECT
$__timeGroupAlias(“time”,$__interval),
“$Filter”,
CASE
WHEN “$Filter” = ‘sdf’ THEN 1
ELSE 1
END AS " "
FROM processdata
WHERE
$__timeFilter(“time”)
GROUP BY 1, “Anlage”,2
ORDER BY 1,2
I can’t use that workaround for MSSQL because i join over multiple tables.
I tried many different ways but i can’t find a solution.
Do anyone has an idea how to achieve that? Or knows a plugin?
thanks in advance
Regards,
Kari
