Trying to migrate old SingleStat panel to new instalation

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?

@imurphy You are welcome to open an issue for the Dynamic text panel regarding the color, and we will look into it.

1 Like

Well, its not an ‘issue’ because there isn’t an option to do this. Doing it in embedded html/javascript may be possible, but its a lot of work. I’ll see if theres an enhancement list somewhere so I can fill out a request. Seems odd that the old singlestat would have disappeared without there being a functional replacement.

@imurphy There is no difference between the Issue and the Feature Request from the GitHub point of view. It’s the same link and list: