The visualization templates I have for creating a dashboard in Chronograf always expect numbers (except table). How can I make it so that I get text instead of a number in certain cases?
For instance:
The logic I want implement is:
if result eq 0 then return "Idle" else return value
That's my Influx-Query, which results into 0
.
SELECT last("DischargingBattery") AS "DischargingBattery" FROM "wallbox"."autogen"."battery"
This ends up into this result on the Dashboard:
When this query result into 0
, I want to see the string "Idle" on my Dashboard instead of a number Zero.
That is what I would like to achieve: