Dashboard chart - crash or bug

I would like to ask if there is a bug or am I doing something wrong in this routine:

image


[{"id":"e05046c10f4aed17","type":"group","z":"52913d9d3ee83890","name":"Graph - Deep Diver","style":{"label":true,"stroke":"#92d04f","fill":"#c8e7a7"},"nodes":["04eef0fecf3be776","56c7e5aee2c581a8","ef2c8d69b3a9bf4c","c44ebe35bb008be9","d060705f50f26e15","b81d613478f43c16","f368dbbf258b08de","690f8a7a7098584d","46f78aa582105ebb"],"x":294,"y":459,"w":1012,"h":202},{"id":"4639c7fae2510b5a","type":"subflow","name":"exec_BD","info":"","category":"","in":[{"x":80,"y":100,"wires":[{"id":"8cc0b55b7d0743c0"}]}],"out":[{"x":1020,"y":100,"wires":[{"id":"4135b832b386a610","port":0}]}],"env":[],"meta":{},"color":"#DDAA99","status":{"x":1020,"y":200,"wires":[{"id":"84933fc7168ae2b4","port":0}]}},{"id":"8cc0b55b7d0743c0","type":"change","z":"4639c7fae2510b5a","name":"copy flow/global to msg","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.ip","pt":"msg","to":"#:(persistent)::IP_vGlobalBD","tot":"global"},{"t":"set","p":"payload.porta","pt":"msg","to":"#:(persistent)::Porta_vGlobalBD","tot":"global"},{"t":"set","p":"payload.usuario","pt":"msg","to":"#:(persistent)::Usuario_vGlobalBD","tot":"global"},{"t":"set","p":"payload.senha","pt":"msg","to":"#:(persistent)::Senha_vGlobalBD","tot":"global"},{"t":"set","p":"payload.nomeBD","pt":"msg","to":"#:(persistent)::NomeBD_vGlobalBD","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":100,"wires":[["effa65099dd2a525"]]},{"id":"4135b832b386a610","type":"mysql2","z":"4639c7fae2510b5a","name":"","server":"","bind":"","topic":"","x":760,"y":100,"wires":[[]]},{"id":"effa65099dd2a525","type":"function","z":"4639c7fae2510b5a","name":"prep_MQTT_Conn","func":"\nconst ip = msg.payload.ip\nconst porta = msg.payload.porta\nconst usuario = msg.payload.usuario\nconst senha = msg.payload.senha\nconst nomeBD = msg.payload.nomeBD\n\nmsg.server = {\n    \"host\": ip,\n    \"port\": porta,\n    \"username\": usuario,\n    \"password\": senha,\n    \"db\": nomeBD\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":100,"wires":[["4135b832b386a610"]]},{"id":"eb96b8b79efaea17","type":"change","z":"4639c7fae2510b5a","name":"","rules":[{"t":"set","p":"server","pt":"msg","to":"{'host': $globalContext('IP_vGlobalBD'),\t 'port': $globalContext('Porta_vGlobalBD'),\t 'username': $globalContext('Usuario_vGlobalBD'),\t 'password': $globalContext('Senha_vGlobalBD'),\t 'bd': \"TelemetriaEnervision\"\t }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":260,"wires":[[]]},{"id":"4a50ea77c5d0ed5b","type":"comment","z":"4639c7fae2510b5a","name":"Quem sabe futuro usar esse Change","info":"Não consegui fazer funcionar com o mysql2, ele diz que o nome do banco de dados não está selecionado.","x":320,"y":220,"wires":[]},{"id":"84933fc7168ae2b4","type":"status","z":"4639c7fae2510b5a","name":"","scope":null,"x":840,"y":200,"wires":[[]]},{"id":"1a924288b2bd59bd","type":"comment","z":"4639c7fae2510b5a","name":"Variaveis Globais, com as informações do BD","info":"As informações sobre a conexão ao Banco de dados estão nas variaveis globais do banco de dados.","x":350,"y":60,"wires":[]},{"id":"04eef0fecf3be776","type":"function","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"f_SQL","func":"\nmsg.topic = \"Select (UNIX_TIMESTAMP(RegistroT)*1000) as x, (-1 * ROUND(Profundidade,2)) as y from TelemetriaMergulho Where nMergulho = \" + msg.payload\n\n\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":540,"wires":[["c44ebe35bb008be9"]]},{"id":"56c7e5aee2c581a8","type":"change","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t   {\t       \"series\":[\"temp\"],\t       \"data\":[ [$$.payload]],\t       \"labels\":[\"temp\"]\t   }\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":580,"wires":[["ef2c8d69b3a9bf4c","f368dbbf258b08de"]]},{"id":"ef2c8d69b3a9bf4c","type":"ui_chart","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","group":"f7757da2b3070a54","order":40,"width":"6","height":6,"label":"Mergulho Realizado","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"120","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1180,"y":580,"wires":[[]]},{"id":"c44ebe35bb008be9","type":"subflow:4639c7fae2510b5a","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","x":720,"y":540,"wires":[["56c7e5aee2c581a8","b81d613478f43c16"]]},{"id":"d060705f50f26e15","type":"link out","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"link out 65","mode":"link","links":["25f94d20679a89c4"],"x":1125,"y":500,"wires":[]},{"id":"b81d613478f43c16","type":"change","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t   {\t       \t       \"data\":[ [$$.payload]]\t       \t   }\t]","tot":"jsonata"},{"t":"set","p":"ProfundidadeMaxima_plan","pt":"msg","to":"ProfundidadeMaxima_plan","tot":"flow"},{"t":"set","p":"ProfMax","pt":"msg","to":"ProfMax","tot":"flow"},{"t":"set","p":"EnableGraph","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":500,"wires":[["d060705f50f26e15"]]},{"id":"f368dbbf258b08de","type":"debug","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"debug 14","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1140,"y":620,"wires":[]},{"id":"690f8a7a7098584d","type":"ui_button","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","group":"f7757da2b3070a54","order":0,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":370,"y":540,"wires":[["04eef0fecf3be776"]]},{"id":"46f78aa582105ebb","type":"ui_text_input","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","label":"","tooltip":"","group":"f7757da2b3070a54","order":2,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"topic","sendOnBlur":true,"className":"","topicType":"msg","x":380,"y":580,"wires":[["04eef0fecf3be776"]]},{"id":"f7757da2b3070a54","type":"ui_group","name":"Group 1","tab":"4ad95848aac3cd1f","order":1,"disp":true,"width":6},{"id":"4ad95848aac3cd1f","type":"ui_tab","name":"Tab 20","icon":"dashboard","order":20}]

Data from JSON

[{"series":["temp"],"data":[[{"x":1685495365000,"y":-1.2},{"x":1685495366000,"y":-1.6},{"x":1685495366000,"y":-2},{"x":1685495367000,"y":-2.4},{"x":1685495367000,"y":-2.8},{"x":1685495368000,"y":-3.2},{"x":1685495369000,"y":-3.6},{"x":1685495369000,"y":-4},{"x":1685495370000,"y":-4.4},{"x":1685495370000,"y":-4.8},{"x":1685495371000,"y":-5.2},{"x":1685495372000,"y":-5.6},{"x":1685495372000,"y":-6},{"x":1685495373000,"y":-6.4},{"x":1685495373000,"y":-6.8},{"x":1685495374000,"y":-7.2},{"x":1685495375000,"y":-7.6},{"x":1685495375000,"y":-8},{"x":1685495376000,"y":-8.4},{"x":1685495376000,"y":-8.8},{"x":1685495377000,"y":-9.2},{"x":1685495378000,"y":-9.6},{"x":1685495378000,"y":-10},{"x":1685495379000,"y":-10.4},{"x":1685495379000,"y":-10.8},{"x":1685495380000,"y":-11.2},{"x":1685495381000,"y":-11.6},{"x":1685495381000,"y":-12},{"x":1685495382000,"y":-12.4},{"x":1685495383000,"y":-12.8},{"x":1685495383000,"y":-13.2},{"x":1685495384000,"y":-13.6},{"x":1685495384000,"y":-14},{"x":1685495385000,"y":-14.4},{"x":1685495386000,"y":-14.8},{"x":1685495386000,"y":-15.2},{"x":1685495387000,"y":-15.6},{"x":1685495387000,"y":-16},{"x":1685495388000,"y":-16.4},{"x":1685495389000,"y":-16.8},{"x":1685495389000,"y":-17.2},{"x":1685495390000,"y":-17.6},{"x":1685495390000,"y":-18},{"x":1685495391000,"y":-18.4},{"x":1685495392000,"y":-18.8},{"x":1685495392000,"y":-19.2},{"x":1685495393000,"y":-19.6},{"x":1685495393000,"y":-20},{"x":1685495394000,"y":-20.4},{"x":1685495395000,"y":-20.8},{"x":1685495395000,"y":-21.2},{"x":1685495396000,"y":-21.6},{"x":1685495396000,"y":-22},{"x":1685495397000,"y":-22.4},{"x":1685495398000,"y":-22.8},{"x":1685495398000,"y":-23.2},{"x":1685495399000,"y":-23.6},{"x":1685495400000,"y":-24},{"x":1685495400000,"y":-24.4},{"x":1685495401000,"y":-24.8},{"x":1685495401000,"y":-25.2},{"x":1685495402000,"y":-25.6},{"x":1685495425000,"y":-25.2},{"x":1685495425000,"y":-24.8},{"x":1685495426000,"y":-24.4},{"x":1685495426000,"y":-24},{"x":1685495426000,"y":-23.6},{"x":1685495427000,"y":-23.2},{"x":1685495427000,"y":-22.8},{"x":1685495428000,"y":-22.4},{"x":1685495428000,"y":-22},{"x":1685495428000,"y":-21.6},{"x":1685495429000,"y":-21.2},{"x":1685495429000,"y":-20.8},{"x":1685495430000,"y":-20.4},{"x":1685495430000,"y":-20},{"x":1685495430000,"y":-19.6},{"x":1685495431000,"y":-19.2},{"x":1685495431000,"y":-18.8},{"x":1685495432000,"y":-18.4},{"x":1685495432000,"y":-18},{"x":1685495432000,"y":-17.6},{"x":1685495433000,"y":-17.2},{"x":1685495433000,"y":-16.8},{"x":1685495434000,"y":-16.4},{"x":1685495434000,"y":-16},{"x":1685495434000,"y":-15.6},{"x":1685495435000,"y":-15.2},{"x":1685495435000,"y":-14.8},{"x":1685495436000,"y":-14.4},{"x":1685495436000,"y":-14},{"x":1685495436000,"y":-13.6},{"x":1685495437000,"y":-13.2},{"x":1685495437000,"y":-12.8},{"x":1685495438000,"y":-12.4},{"x":1685495438000,"y":-12},{"x":1685495438000,"y":-11.6},{"x":1685495439000,"y":-11.2},{"x":1685495439000,"y":-10.8},{"x":1685495440000,"y":-10.4},{"x":1685495440000,"y":-10},{"x":1685495440000,"y":-9.6},{"x":1685495441000,"y":-9.2},{"x":1685495441000,"y":-8.8},{"x":1685495442000,"y":-8.4},{"x":1685495442000,"y":-8},{"x":1685495443000,"y":-7.6},{"x":1685495443000,"y":-7.2},{"x":1685495443000,"y":-6.8},{"x":1685495444000,"y":-6.4},{"x":1685495444000,"y":-6},{"x":1685495445000,"y":-5.6},{"x":1685495445000,"y":-5.2},{"x":1685495459000,"y":-4.8},{"x":1685495460000,"y":-4.4},{"x":1685495461000,"y":-4},{"x":1685495462000,"y":-3.6},{"x":1685495463000,"y":-3.2},{"x":1685495464000,"y":-2.8},{"x":1685495465000,"y":-2.4},{"x":1685495466000,"y":-2},{"x":1685495467000,"y":-1.6},{"x":1685495468000,"y":-1.2},{"x":1685495469000,"y":-0.8},{"x":1685495470000,"y":-0.4},{"x":1685495471000,"y":0}]],"labels":["temp"]}]

The problem is the following:

Out of nowhere this graph just stops showing up. And I don't know why.

It always works the first time. then out of nowhere it does not plot the information on the graph. I don't know why.

if i enter 1 result that is empty.

If I go back and enter a result that is full it will no longer plot the data.

If I press F5 on the keyboard and reload the page then yes it works again with the full value.

Very weird... is it a bug?

Which versions of node-red and node-red-dashboard are you using? Is the dashboard the latest?

What browser/version are you using? Can you try a different browser?

Open the browser developer console. Make the chart fail, do you see any errors in the console window?

This screen below is working:

This screen below is when I type a value that does not find anything in the database, as if I called an empty reference.

This screen is when I retype the value that yes, it worked the first time and it doesn't work anymore.

I already found a way to fix the bug.

But I found a kludge (I don't know if I'm right).

I zero the graph every time I send data and I delay sending the real json. That way it stops bugging (but I still think it's a node-red BUG).

Version the Node-red is:

image

I solved problem this

Please try to answer all the questions I asked previously.
Which version of node-red-dashboard are you using and is it the latest (check in Manage Pallete)?

Can you create a flow that we can use to replicate the problem? Use inject nodes to inject the data required. We cannot test using the flow you posted earlier as we do not have your database.

The issue is, if you return an empty array from the sql query [ ] the the chart data array will look like [ [ ] ], but should look like
[ [ { } ] ]

So you have to detect the empty array from the sql query. Then either return a array with one object as above, this will show a empty chart.
Or return the final payload as just [ ], this will return a blank chart, awaiting data.

e.g.

[{"id":"690f8a7a7098584d","type":"ui_button","z":"b9860b4b9de8c8da","name":"","group":"f7757da2b3070a54","order":0,"width":0,"height":0,"passthru":false,"label":"data in array","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"[{\"x\":1685495365000,\"y\":-1.2},{\"x\":1685495366000,\"y\":-1.6},{\"x\":1685495366000,\"y\":-2},{\"x\":1685495367000,\"y\":-2.4},{\"x\":1685495367000,\"y\":-2.8},{\"x\":1685495368000,\"y\":-3.2},{\"x\":1685495369000,\"y\":-3.6},{\"x\":1685495369000,\"y\":-4},{\"x\":1685495370000,\"y\":-4.4},{\"x\":1685495370000,\"y\":-4.8},{\"x\":1685495371000,\"y\":-5.2},{\"x\":1685495372000,\"y\":-5.6},{\"x\":1685495372000,\"y\":-6},{\"x\":1685495373000,\"y\":-6.4},{\"x\":1685495373000,\"y\":-6.8},{\"x\":1685495374000,\"y\":-7.2},{\"x\":1685495375000,\"y\":-7.6},{\"x\":1685495375000,\"y\":-8},{\"x\":1685495376000,\"y\":-8.4},{\"x\":1685495376000,\"y\":-8.8},{\"x\":1685495377000,\"y\":-9.2},{\"x\":1685495378000,\"y\":-9.6},{\"x\":1685495378000,\"y\":-10},{\"x\":1685495379000,\"y\":-10.4},{\"x\":1685495379000,\"y\":-10.8},{\"x\":1685495380000,\"y\":-11.2},{\"x\":1685495381000,\"y\":-11.6},{\"x\":1685495381000,\"y\":-12},{\"x\":1685495382000,\"y\":-12.4},{\"x\":1685495383000,\"y\":-12.8},{\"x\":1685495383000,\"y\":-13.2},{\"x\":1685495384000,\"y\":-13.6},{\"x\":1685495384000,\"y\":-14},{\"x\":1685495385000,\"y\":-14.4},{\"x\":1685495386000,\"y\":-14.8},{\"x\":1685495386000,\"y\":-15.2},{\"x\":1685495387000,\"y\":-15.6},{\"x\":1685495387000,\"y\":-16},{\"x\":1685495388000,\"y\":-16.4},{\"x\":1685495389000,\"y\":-16.8},{\"x\":1685495389000,\"y\":-17.2},{\"x\":1685495390000,\"y\":-17.6},{\"x\":1685495390000,\"y\":-18},{\"x\":1685495391000,\"y\":-18.4},{\"x\":1685495392000,\"y\":-18.8},{\"x\":1685495392000,\"y\":-19.2},{\"x\":1685495393000,\"y\":-19.6},{\"x\":1685495393000,\"y\":-20},{\"x\":1685495394000,\"y\":-20.4},{\"x\":1685495395000,\"y\":-20.8},{\"x\":1685495395000,\"y\":-21.2},{\"x\":1685495396000,\"y\":-21.6},{\"x\":1685495396000,\"y\":-22},{\"x\":1685495397000,\"y\":-22.4},{\"x\":1685495398000,\"y\":-22.8},{\"x\":1685495398000,\"y\":-23.2},{\"x\":1685495399000,\"y\":-23.6},{\"x\":1685495400000,\"y\":-24},{\"x\":1685495400000,\"y\":-24.4},{\"x\":1685495401000,\"y\":-24.8},{\"x\":1685495401000,\"y\":-25.2},{\"x\":1685495402000,\"y\":-25.6},{\"x\":1685495425000,\"y\":-25.2},{\"x\":1685495425000,\"y\":-24.8},{\"x\":1685495426000,\"y\":-24.4},{\"x\":1685495426000,\"y\":-24},{\"x\":1685495426000,\"y\":-23.6},{\"x\":1685495427000,\"y\":-23.2},{\"x\":1685495427000,\"y\":-22.8},{\"x\":1685495428000,\"y\":-22.4},{\"x\":1685495428000,\"y\":-22},{\"x\":1685495428000,\"y\":-21.6},{\"x\":1685495429000,\"y\":-21.2},{\"x\":1685495429000,\"y\":-20.8},{\"x\":1685495430000,\"y\":-20.4},{\"x\":1685495430000,\"y\":-20},{\"x\":1685495430000,\"y\":-19.6},{\"x\":1685495431000,\"y\":-19.2},{\"x\":1685495431000,\"y\":-18.8},{\"x\":1685495432000,\"y\":-18.4},{\"x\":1685495432000,\"y\":-18},{\"x\":1685495432000,\"y\":-17.6},{\"x\":1685495433000,\"y\":-17.2},{\"x\":1685495433000,\"y\":-16.8},{\"x\":1685495434000,\"y\":-16.4},{\"x\":1685495434000,\"y\":-16},{\"x\":1685495434000,\"y\":-15.6},{\"x\":1685495435000,\"y\":-15.2},{\"x\":1685495435000,\"y\":-14.8},{\"x\":1685495436000,\"y\":-14.4},{\"x\":1685495436000,\"y\":-14},{\"x\":1685495436000,\"y\":-13.6},{\"x\":1685495437000,\"y\":-13.2},{\"x\":1685495437000,\"y\":-12.8},{\"x\":1685495438000,\"y\":-12.4},{\"x\":1685495438000,\"y\":-12},{\"x\":1685495438000,\"y\":-11.6},{\"x\":1685495439000,\"y\":-11.2},{\"x\":1685495439000,\"y\":-10.8},{\"x\":1685495440000,\"y\":-10.4},{\"x\":1685495440000,\"y\":-10},{\"x\":1685495440000,\"y\":-9.6},{\"x\":1685495441000,\"y\":-9.2},{\"x\":1685495441000,\"y\":-8.8},{\"x\":1685495442000,\"y\":-8.4},{\"x\":1685495442000,\"y\":-8},{\"x\":1685495443000,\"y\":-7.6},{\"x\":1685495443000,\"y\":-7.2},{\"x\":1685495443000,\"y\":-6.8},{\"x\":1685495444000,\"y\":-6.4},{\"x\":1685495444000,\"y\":-6},{\"x\":1685495445000,\"y\":-5.6},{\"x\":1685495445000,\"y\":-5.2},{\"x\":1685495459000,\"y\":-4.8},{\"x\":1685495460000,\"y\":-4.4},{\"x\":1685495461000,\"y\":-4},{\"x\":1685495462000,\"y\":-3.6},{\"x\":1685495463000,\"y\":-3.2},{\"x\":1685495464000,\"y\":-2.8},{\"x\":1685495465000,\"y\":-2.4},{\"x\":1685495466000,\"y\":-2},{\"x\":1685495467000,\"y\":-1.6},{\"x\":1685495468000,\"y\":-1.2},{\"x\":1685495469000,\"y\":-0.8},{\"x\":1685495470000,\"y\":-0.4},{\"x\":1685495471000,\"y\":0}]","payloadType":"json","topic":"topic","topicType":"msg","x":370,"y":2560,"wires":[["b385bd7f670bdcf6"]]},{"id":"b385bd7f670bdcf6","type":"switch","z":"b9860b4b9de8c8da","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":2560,"wires":[["56c7e5aee2c581a8"],["333c38d6e0ee916b"]]},{"id":"c769388d5ba9b65d","type":"ui_button","z":"b9860b4b9de8c8da","name":"","group":"f7757da2b3070a54","order":0,"width":0,"height":0,"passthru":false,"label":"empty array","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"[]","payloadType":"json","topic":"topic","topicType":"msg","x":370,"y":2620,"wires":[["b385bd7f670bdcf6"]]},{"id":"56c7e5aee2c581a8","type":"change","z":"b9860b4b9de8c8da","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t   {\t       \"series\":[\"temp\"],\t       \"data\":[ [$$.payload]],\t       \"labels\":[\"temp\"]\t   }\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":2560,"wires":[["ef2c8d69b3a9bf4c","f368dbbf258b08de"]]},{"id":"333c38d6e0ee916b","type":"change","z":"b9860b4b9de8c8da","name":"enpty chart","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{}]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":2620,"wires":[["56c7e5aee2c581a8"]]},{"id":"1c69c3061ebdc40f","type":"ui_button","z":"b9860b4b9de8c8da","name":"","group":"f7757da2b3070a54","order":0,"width":0,"height":0,"passthru":false,"label":"empty array bypass switch, lock chart","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"[]","payloadType":"json","topic":"topic","topicType":"msg","x":430,"y":2680,"wires":[["56c7e5aee2c581a8"]]},{"id":"ef2c8d69b3a9bf4c","type":"ui_chart","z":"b9860b4b9de8c8da","name":"","group":"f7757da2b3070a54","order":40,"width":"6","height":6,"label":"Mergulho Realizado","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"No result returned","dot":false,"ymin":"","ymax":"","removeOlder":"120","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1010,"y":2560,"wires":[[]]},{"id":"f368dbbf258b08de","type":"debug","z":"b9860b4b9de8c8da","name":"debug 14","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1000,"y":2640,"wires":[]},{"id":"e3150131a65236b2","type":"change","z":"b9860b4b9de8c8da","name":"blank chart","rules":[{"t":"set","p":"payload","pt":"msg","to":"[]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":2660,"wires":[["ef2c8d69b3a9bf4c"]]},{"id":"f7757da2b3070a54","type":"ui_group","name":"Group 1","tab":"4ad95848aac3cd1f","order":1,"disp":true,"width":6},{"id":"4ad95848aac3cd1f","type":"ui_tab","name":"Tab 20","icon":"dashboard","order":20}]

bypass switch button will lock up chart.

I did just that. I zero the graph first and then enter the data.

I even replied with a photo:

Node-red version 3.02 and I also posted a picture with developer mode open.

And I also inserted json values ​​to test this flow.

You may want to look at my example more closely, There is no delay and the message is not cloned for another wire. Your flow works but is not efficient. You could also remove the other wire branch for the 4 rule change node, as the data you need is in the output of the chart node.

2 Likes

The question I asked that I had not seen the answer to was what is the node-red-dashboard version? I wanted to know whether you are seeing the problem with the latest version or an earlier one.

sorry, i confused.

Look in the editor menu Manage Palette to see what version you are using. The file package.json does not tell you exactly which version it is.

It's ok, I have confirmed that sending the the malformed data to a chart from the latest version of node-red-dashboard (3.5.0) does lock it up until you send it some different data or clear the chart. Probably that should be reported as a bug.

1 Like

That's why I like this tool so much.

You guys provide excellent technical support.

Congratulations

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.