[ImageIt] Using different ImageURL based on a condition

I’m querying the last observation of an InfluxDB time-series measurement, which indicates an up or down trend (if value>0 → positive trend).

Now I want to add an arrow pointing up/down, depending on this value.

image

So far, I’ve not found a way to do this with Grafana. Currently, I’m using ImageIt for this, with the ImageURL “active_trend.png”. I’m running a separate microservice querying the observation and then renaming either “positive_trend.png” or “negative_trend.png” to “active_trend.png”. This is a very hacky solution that does not work well, since the image is cached by the browser and it takes a while until the new image is visible in the frontend.

I also considered creating a variable that changes based on the value of this observation, however, I did not manage to find out how/if this is possible. Can someone point me in the right direction?

welcome to the :grafana: forum, @bbruhn

much more lightweight but also narrower and not ideal solution for visualizing booleans: one could use value mapping and emoji? :
1 = :arrow_up:
0 = :arrow_down:

copy the emoji icon from the browser column here. Then paste it in:

1 Like