I'd like to create multiple gauges with the node-red-dashboard in a dynamic way. Let's say I have this dashboard:
It was created by manually setting each gauge as the following:
But let's say I have the following JSON:
[
{
"topic": "name1",
"payload": 10
},
{
"topic": "name2",
"payload": 5
},
{
"topic": "name3",
"payload": 6
},
{
"topic": "name4",
"payload": 7
},
{
"topic": "name5",
"payload": 4
},
{
"topic": "name6",
"payload": 10
},
{
"topic": "name7",
"payload": 9
},
]
Let's also say that this JSON is dynamic and it can have a vector with different lengths. In this example, its length is 7 but in my case, it could reach more than 50 while also having the possibility of increasing its length from time to time. Is it possible to draw a flow where I don't need to manually insert 50 gauges instances in it? Something like sending separated messages to a single gauge and it manages to draw the dashboard with different gauges?
I haven't found anything related to this kind of functionality in its documentation... Can I do it by mixing it with other dashboard nodes?
I can generate this JSON dynamically from time to time. I could use a function node to loop in it and use the node.send()
function to separate the messages. The problem is that if I do it in a single gauge node I'll see changes only in a single gauge in my dashboard.