Just sharing an Echart gauge that I've created in Flexdash, using the flexdash custom node
.
[{"id":"27e8564637493f56","type":"flexdash custom","z":"1543d308b342690a","fd_container":"28d1859702cdf729","fd_cols":"3","fd_rows":"4","fd_array":false,"fd_array_max":10,"fd_output_topic":"","fd_loopback":false,"name":"Echarts","title":"","sfc_source":"<template>\n <v-chart class=\"chart\" :option=\"option\" autoresize />\n</template>\n\n<style scoped>\n.chart {\n height: 100%;\n}\n</style>\n\n<script>\nimport { use } from 'echarts/core'\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { GaugeChart } from 'echarts/charts'\nimport {\n TitleComponent,\n TooltipComponent,\n LegendComponent,\n} from 'echarts/components';\n\nimport VChart, { THEME_KEY } from 'vue-echarts'\nuse([\n CanvasRenderer,\n GaugeChart,\n TitleComponent,\n TooltipComponent,\n LegendComponent,\n]);\n\nexport default {\n // Props are the inputs to the widget.\n // They can be set dynamically using Node-RED messages using `msg.<prop>`.\n // In a \"custom widget\" like this one they cannot be set via the Node-RED flow editor:\n // use the default values in the lines below instead.\n props: {\n option: { default: {} },\n },\n components: { VChart },\n}\n</script>\n","import_map":{"echarts/core":"https://cdn.jsdelivr.net/npm/echarts/dist/echarts.esm.js","echarts/renderers":"https://esm.sh/echarts/renderers","echarts/charts":"https://esm.sh/echarts/charts","echarts/components":"https://esm.sh/echarts/components","vue-echarts":"https://cdn.jsdelivr.net/npm/vue-echarts@6.3.3/dist/index.esm.min.js","vue-demi":"https://cdn.jsdelivr.net/npm/vue-demi@0.13.11/lib/v3/index.mjs","resize-detector":"https://cdn.jsdelivr.net/npm/resize-detector@0.3.0/esm/index.js"},"x":550,"y":1960,"wires":[[]]},{"id":"69c3d54ac37e10a9","type":"function","z":"1543d308b342690a","name":"sample echarts","func":"/*\nUse msg.title, msg.min, msg.max & msg.units to\nchange default values, and msg.payload for gauge value.\n*/\nlet gaugeTitle, gaugeUnits, gaugeMin, gaugeMax\nconst dataValue = msg.payload\nif (msg.title) { gaugeTitle = msg.title } else gaugeTitle = \"\"\nif (msg.units) { gaugeUnits = msg.units } else gaugeUnits =\"Ā°C\"\nif (msg.min) { gaugeMin = Number(msg.min) } else gaugeMin = 0\nif (msg.max) { gaugeMax = Number(msg.max) } else gaugeMax = 100\n\nconst option = {\n title: {\n text: gaugeTitle\n },\n series: [\n {\n type: 'gauge',\n axisLine: {\n lineStyle: {\n width: 30,\n color: [\n [0.3, '#67e0e3'],\n [0.7, '#37a2da'],\n [1, '#fd666d']\n ]\n }\n },\n pointer: {\n itemStyle: {\n color: 'auto'\n }\n },\n axisTick: {\n distance: -30,\n length: 8,\n lineStyle: {\n color: '#fff',\n width: 2\n }\n },\n splitLine: {\n distance: -30,\n length: 30,\n lineStyle: {\n color: '#fff',\n width: 4\n }\n },\n axisLabel: {\n color: 'auto',\n distance: 40,\n fontSize: 12\n },\n detail: {\n valueAnimation: true,\n // formatter: '{value} Ā°C',\n formatter: '{value}' + gaugeUnits,\n color: 'auto',\n fontSize: 14\n },\n data: [\n {\n value: dataValue\n }\n ],\n max: gaugeMax,\n min: gaugeMin\n }\n ]\n};\n\nreturn { option }","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":1960,"wires":[["27e8564637493f56"]]},{"id":"ca67244a0349768d","type":"inject","z":"1543d308b342690a","name":"Random payload","props":[{"p":"payload"},{"p":"title","v":"Temperature","vt":"str"},{"p":"max","v":"30","vt":"num"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"$floor($random()*30)","payloadType":"jsonata","x":160,"y":1960,"wires":[["69c3d54ac37e10a9"]]},{"id":"28d1859702cdf729","type":"flexdash container","name":"charts","kind":"StdGrid","fd_children":",d2dbe97c44f6fb5a,d2b3883a74adc563,ab904c40d22f83e1,527401ee602f4386,4f31b9c704e0b947,a8dfa00ae270ac88,b27685878ffe3711,8713c375979525c8,5021eeaf697e64c2,02a8193ebdb37b8f,4ba2dad94e5ffd6f,5aa2f5882d6d108c,99d0a46353e4f3f8,8db95e700c175b9c,27e8564637493f56,2582a4c3e5ae0e0e","title":"","tab":"9f23b0158f8280e3","min_cols":"1","max_cols":"20","unicast":"","parent":"","solid":false,"cols":"1","rows":"1"},{"id":"9f23b0158f8280e3","type":"flexdash tab","name":"charts","icon":"mdi-chart-line","title":"charts","fd_children":",28d1859702cdf729","fd":"e8f5aea52ab49500"}]
[EDIT 27/12/22] - Flow updated to allow properties to be set via incoming msg (similar to default FD widgets)