That looks promising thanks @Buckskin. Only now there are three different syntaxes to define the function; I need to try and work out if they are actually different or just rewording.
.
Well I was reading that thread and I recalled @juntiedt's functions in global context, which is why I came here and asked. (Actually, there I felt like a kid sticking my hand up and being ignored by all the grownups, I'm thoroughly out of my depth)
I think Steve is suggesting this syntax could be made to work within the dashboard widget itself.
Your suggestion of
$globalContext('formatLabel')(payload, 2, "£ ", ' million')
is slightly less cryptic (no squiggly brackets) and it already works in a change node so no need to modify the dashboard code.
It has the advantage over doing the formatting entirely in Jsonata $formatNumber()
that the function is declared once and can be used in many places.
The downside is you need the extra change node.