Dashboard 2 Migration using AI?

I have had a fair few issues with Dashboard 2.
Some were bugs, some related to appearance, some to usability and some just down to me misunderstanding.

But @BartButenaers has perfectly reasonably asked for specific examples where DB2 requires more coding than DB1.

The first example that jumps to my mind is with the gauge - how to represent a value of 1234.56789 as 1,234.57%.

Please note, I don't claim that this is a sensible thing to want to do.
Nor am I asking for this widget to be fixed.
It is just an example where DB2 requires more code than DB1. A function or Jsonata and CSS.

DB1
Angular filters let you do this right in the gauge config.
image

DB2
You need to massage the payload, most likely with a function node.

msg.payload = msg.payload.toFixed(2) 
return msg;

I tried formatting the number with commas but it breaks the gauge.

Look at the result:
The DB1 gauge has an appropriate choice of font size and positioning. The limiting values are below and outside the coloured band leaving plenty of space for the value.
No doubt it can be enhanced but I am sufficiently happy with this to use it in a dashboard and move on.

The DB2 gauge.
The value is displayed in too large a font and too far up into the semicircle, reducing the available space.
The limit values occupy space inside the semicircle which could be used for the value.
The pointer seems unnecessarily small.
I don't feel this gauge can be left as is. At the very least it needs significant CSS work, more likely a different (contrib) widget.

2 Likes