Thank you. Just tried it but it makes the led array disappear altogether.
It may be something to do with the else. I do not fully understand what this is:
}else if (typeof $scope.msg.payload !== "number"){
$scope.msg = {"bargraph":[...bargraph], "payload": 0, "label":label}
}
}else{
$scope.msg = {"bargraph":[...bargraph], "payload": 0, "label":label}
}
In the original code msg.payload was a number. I do not know what to put here in its place ?
P.S. I started a new topic https://discourse.nodered.org/t/dashboard-template-led-array-problems/50022?u=ozpos