Customize ui_gauge

Hello,
is there any way to customize the ui_gauge a bit further than the "normal" settings?
I would like to hide the "needle" using the gauge mode.
In addition I would like to get rid of the space the label uses cause I don't need the label.
Are there any solutions - maybe with use of ui_template?

Here's a full reference of the dashboard node fields you can set using msg.ui_control : https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md

@zenofmud: I knoww those settings. My question was if there is any other way to configure this control, maybe by use of ui_template

and did you read down as far as...

"
The gauge options can accept any of the Justgage parameters for example:

 {"options":{"pointer":false,"gaugeWidthScale":1.5}}
 {"options":{"pointer":true,"gaugeWidthScale":0.4,"reverse":true}}

The first example hides the needle.

Sorry, I didn't see realize that section - my fault!
Could you please help we where to put this option? into Value format?

Sorry. I thought you had now read the first sentence of that doc.

@dceejay: Thanks for your help and patience. Now I found out what the both of you meant!
But if I add this to the msg.ui_control the control gets continiously refreshed.

I did try this using a change node and also just edited the msg.ui_control and each time it refreshes on its own!?

Do you mean refresh after deploy? If so, then there is a little trick you can use

[{"id":"e24c988b.699b78","type":"change","z":"15462191.80250e","name":"","rules":[{"t":"set","p":"ui_control.options.minLabelMinFontSize","pt":"msg","to":"16","tot":"num"},{"t":"set","p":"ui_control.options.maxLabelMinFontSize","pt":"msg","to":"16","tot":"num"},{"t":"set","p":"ui_control.options.labelMinFontSize","pt":"msg","to":"16","tot":"str"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":340,"wires":[["8c14a7d9.681bb8"]]},{"id":"8c14a7d9.681bb8","type":"ui_gauge","z":"15462191.80250e","name":"","group":"39b7a5c6.1e9a8a","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value|number:2}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"3","seg2":"7","x":690,"y":400,"wires":[]},{"id":"22d7d976.1fa2c6","type":"inject","z":"15462191.80250e","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":390,"y":400,"wires":[["f0bfbde4.1a8cf"]]},{"id":"f97cda05.dde058","type":"ui_ui_control","z":"15462191.80250e","name":"","x":180,"y":200,"wires":[["95ef6d63.e77fd"]]},{"id":"2d8d8dd6.8c2a82","type":"comment","z":"15462191.80250e","name":"To send options when dashboard connects","info":"","x":270,"y":160,"wires":[]},{"id":"95ef6d63.e77fd","type":"delay","z":"15462191.80250e","name":"","pauseType":"delay","timeout":"40","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":320,"y":260,"wires":[["e24c988b.699b78"]]},{"id":"250f93b0.a9b97c","type":"comment","z":"15462191.80250e","name":"Let gauge to be initialized before change any options","info":"There will be browser errors otherwise ","x":460,"y":220,"wires":[]},{"id":"d94b0f1f.2a6f6","type":"comment","z":"15462191.80250e","name":"Change the options","info":"gauge scales according to predefined card size\ndefined font sizes are not absolute values but minimum values\nFor example if you make your gauge smaller, the changed font sizes may happen to be too large and will overlap.\n\nminLabelMinFontSize - minimum size of min field // number\nmaxLabelMinFontSize - minimum size of max field // number\nlabelMinFontSize - minimum size of units field // numbert\n\ndelete msg.payload cos it does not contain proper value","x":520,"y":300,"wires":[]},{"id":"f0bfbde4.1a8cf","type":"function","z":"15462191.80250e","name":"random","func":"msg.payload = Math.random()*10\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":400,"wires":[["8c14a7d9.681bb8"]]},{"id":"a651e851.2a2a28","type":"comment","z":"15462191.80250e","name":"generate random value","info":"","x":470,"y":440,"wires":[]},{"id":"39b7a5c6.1e9a8a","type":"ui_group","z":"","name":"Default","tab":"ad12ad91.ab672","disp":true,"width":"6","collapse":false},{"id":"ad12ad91.ab672","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

This is the trick, thank you!

1 Like

Hello

I was trying to apply the example you have commented above, but I am not able to change the text size of the value obtained by the temperature sensor.

Can you help me in what I am doing wrong?

Thank you very much in advance.

gauge

For value field do following:
image

Hello

I have tried with the value that you indicated, but I do not observe changes in the size of the text.

Could it be because of the size of the "widget"?

Thanks again!!!!

Works fine form me
image
With dashboard options
image