If you read the sidebar help text it says
The label can also be set by a message property by setting the field to the name of the property, for example {{msg.topic}}
.
This also applies to value format and unit input fields. So you can feed in any msg property you wish, and dynamically populate the fields.
e,g
[{"id":"3a8b88d5c2d8e8c5","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"units","v":"BARS","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":610,"y":4520,"wires":[["a1150a35d5b13b55"]]},{"id":"a1150a35d5b13b55","type":"ui_gauge","z":"d1395164b4eec73e","name":"","group":"4f791fdc1745d3d9","order":3,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"{{msg.units}}","format":"{{value}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":790,"y":4520,"wires":[]},{"id":"6ea8cae4f7759baa","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"units","v":"PSI","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"40","payloadType":"num","x":610,"y":4560,"wires":[["a1150a35d5b13b55"]]},{"id":"4f791fdc1745d3d9","type":"ui_group","name":"micro","tab":"c954274bbed7292e","order":1,"disp":false,"width":"18","collapse":false,"className":""},{"id":"c954274bbed7292e","type":"ui_tab","name":"Solar","icon":"dashboard","order":1,"disabled":false,"hidden":false}]