Hi, I have an old Grafana server on which I have a few dashboards configured which use the SingleStat panel. I need to migrate this configuration over to a new Grafana server, running the latest version. However, the SingleStat panel no longer exists.
The old SingleStat panels display a single figure with some text. The text is broken over a couple of lines. Think ‘53 Days’ with the text ‘with no accidents’ just underneath. The background of the panel changes from red to green based on the data. A higher value is better and displays green after a certain point. This was achived using the ‘Postfix’ option in the panel which allowed you to put both text and html (so you could put a br/ in the text)
The new Stat panel sort of replaces it. The only way I’ve found to display text is for my query to return a numeric value and a second column which is the text I want. I can then choose ‘text mode’ = ‘value and name’. However, this results in a very long text on a single line and places the text before the value, so I would have to do 'Days without accidents: ’ which would be followed by the value. Its not very flexible.
The Dynamic Text panel allows for a great deal of flexibility, but I can’t see any way to get it to colour the background based on a value so that my panel changes from green to orange to red. I can get it to generate a single colour background, but colouring the whole panel background is proving difficult.
Can anyone point me in the right direction of what I should be looking at?