Values color - gauge

#1

Hi,
I'm using some template as a gauge. I changed the text color but I need to change the values color. PNG
13

regards,

0 Likes

Axis Font Size on Barchart
#2

Does this help ?

0 Likes

#3

Not to much! :persevere::sweat_smile:

0 Likes

#4

Most of gauge elements have inline styles so overriding is not an option here. Sadly.

0 Likes

#5

Really. The justgage options expose valueFontColor

0 Likes

#6

To change gauge options with msg

msg = {payload:25,ui_control:{options:{valueFontColor:"#00ff00"}}}
return msg;
1 Like

#7

It's doesn't work :confused:

0 Likes

#8

Share your flow.

0 Likes

#11

[{"id":"a1686925.d3c5a8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"7f5513d2.af4a1c","type":"ui_template","z":"a1686925.d3c5a8","group":"d30fde8b.f7dc7","name":"Mesures","order":0,"width":"6","height":"40","format":"\n #CabaneDeGardian_Mesures,\n #CabaneDeGardian_Mesures md-card {\n background : rgba(205,205,205,0);\n border: rgba(205,205,205,0);\n height: 200px; \n font-size: 25px;\n color: lime;\n position: center;\n }\n\n\n\n\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":900,"y":340,"wires":[]},{"id":"b6d28dfd.a4b6","type":"ui_gauge","z":"a1686925.d3c5a8","name":"CO2","group":"d30fde8b.f7dc7","order":5,"width":0,"height":0,"gtype":"gage","title":"CO2","label":"ppm","format":"{{msg.payload}}","min":"350","max":"40000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"1000","seg2":"2000","x":1010,"y":400,"wires":},{"id":"bb0b50e5.5e48f","type":"function","z":"a1686925.d3c5a8","name":"","func":"var buf = Buffer.from(msg.payload);\nvar s = buf.readUInt8() >> 7 === 0 ? 0 : 2048;\nvar m = (buf.readUInt16BE() & 0b0000011111111111) - s;\nvar e = (buf.readUInt8() & 0b01111000) >> 3;\nmsg.payload = 0.01 * m * Math.pow(2, e);\nmsg.payload = msg.payload.toFixed(1);\nreturn msg","outputs":1,"noerr":0,"x":770,"y":400,"wires":[["b6d28dfd.a4b6"]]},{"id":"96e22936.e103a8","type":"change","z":"a1686925.d3c5a8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":400,"wires":[["bb0b50e5.5e48f"]]},{"id":"17967275.e6a46e","type":"switch","z":"a1686925.d3c5a8","name":"CO2","property":"payload.dstgad","propertyType":"msg","rules":[{"t":"eq","v":"6/6/2","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":310,"y":400,"wires":[["96e22936.e103a8"]]},{"id":"d30fde8b.f7dc7","type":"ui_group","z":"","name":"Mesures","tab":"4f409648.8d9438","order":6,"disp":false,"width":"6","collapse":false},{"id":"4f409648.8d9438","type":"ui_tab","z":"","name":"CabaneDeGardian","icon":"home","order":1}]

0 Likes

#12

Unfortunately your flow isn’t currently importable.Please read the following post How to share code or flow json and then edit the above message.

0 Likes

#13
[{"id":"6aad5549.ea5dec","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"936f2449.6e5f18","type":"ui_template","z":"6aad5549.ea5dec","group":"d30fde8b.f7dc7","name":"Mesures","order":0,"width":"6","height":"40","format":"<style>\n #CabaneDeGardian_Mesures,\n #CabaneDeGardian_Mesures md-card  {\n background : rgba(205,205,205,0);\n border: rgba(205,205,205,0);\n height: 200px; \n font-size: 25px;\n color: lime;\n position: center;\n   }\n\n</style>\n\n\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":900,"y":340,"wires":[[]]},{"id":"ade47aa8.9f0a58","type":"ui_gauge","z":"6aad5549.ea5dec","name":"CO2","group":"d30fde8b.f7dc7","order":5,"width":0,"height":0,"gtype":"gage","title":"CO2","label":"ppm","format":"{{msg.payload}}","min":"350","max":"40000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"1000","seg2":"2000","x":1010,"y":400,"wires":[]},{"id":"85c3fd77.0bb5f","type":"function","z":"6aad5549.ea5dec","name":"","func":"var buf = Buffer.from(msg.payload);\nvar s = buf.readUInt8() >> 7 === 0 ? 0 : 2048;\nvar m = (buf.readUInt16BE() & 0b0000011111111111) - s;\nvar e = (buf.readUInt8() & 0b01111000) >> 3;\nmsg.payload = 0.01 * m * Math.pow(2, e);\nmsg.payload = msg.payload.toFixed(1);\nreturn msg","outputs":1,"noerr":0,"x":770,"y":400,"wires":[["ade47aa8.9f0a58"]]},{"id":"d30fde8b.f7dc7","type":"ui_group","z":"","name":"Mesures","tab":"4f409648.8d9438","order":6,"disp":false,"width":"6","collapse":false},{"id":"4f409648.8d9438","type":"ui_tab","z":"","name":"CabaneDeGardian","icon":"home","order":1}]
0 Likes

#14

I don't see that you are trying to use the option I suggested

0 Likes

#15

like this?

[{"id":"feba725a.782358","type":"function","z":"6aad5549.ea5dec","name":"","func":"msg = {payload:25,ui_control:{options:{valueFontColor:\"#00ff00\"}}} \nreturn msg;","outputs":1,"noerr":0,"x":770,"y":440,"wires":[["ade47aa8.9f0a58"]]}]
0 Likes

#16

True. It does not work for Node-RED theme, but works with Angular theme. Weird.

0 Likes