# Dashboard chart - crash or bug

**URL:** <https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098>\
**Category:** Dashboard\
**Created:** [26 July 2023 20:29 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098 "2023-07-26T20:29:56Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [26 July 2023 20:29 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/1 "2023-07-26T20:29:56Z")

</div>

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

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/742524288f883f827ef477715e3e33ed1c3b0fbd.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/5427a94fd0c1756b84fb7d54e4b09668efc15664.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/8/d8ac549aff136319f5726642f810964697ff4548.png)

```auto
[{"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

```auto
[{"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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 July 2023 20:49 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/2 "2023-07-26T20:49:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [26 July 2023 20:55 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/3 "2023-07-26T20:55:59Z")

</div>

This screen below is working:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f033175b4508662ce733ef48991cbd242f5be351.png)

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cb78705dac6aa128c9c2f498a49ef1b368d771c1.png)

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/5/e5e45ea6d1cef420f8fd1386380ff2678754a6f9.png)

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/b/0b60a94979cb6ff3dbf80c63bf45305deb9b47f8.png)

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [26 July 2023 21:00 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/4 "2023-07-26T21:00:09Z")

</div>

I solved problem this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/6/16d97a91dc6ea5800f41ed9c1c7329e39f620a75.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 July 2023 21:03 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/5 "2023-07-26T21:03:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 July 2023 21:28 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/6 "2023-07-26T21:28:32Z")

</div>

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.

```auto
[{"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.

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [26 July 2023 22:28 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/7 "2023-07-26T22:28:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [26 July 2023 22:29 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/8 "2023-07-26T22:29:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 July 2023 22:50 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/9 "2023-07-26T22:50:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 July 2023 08:13 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/10 "2023-07-27T08:13:54Z")

</div>

> [@allacmc](#):
>
> I even replied with a photo:

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.

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [27 July 2023 11:46 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/11 "2023-07-27T11:46:51Z")

</div>

sorry, i confused.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c7887bd5282d5216ab17fcbf576187f5efde1136.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 July 2023 12:48 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/12 "2023-07-27T12:48:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 July 2023 13:08 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/13 "2023-07-27T13:08:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [28 July 2023 14:51 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/14 "2023-07-28T14:51:44Z")

</div>

That's why I like this tool so much.

You guys provide excellent technical support.

Congratulations

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 August 2023 14:52 UTC](https://discourse.nodered.org/t/dashboard-chart-crash-or-bug/80098/15 "2023-08-11T14:52:07Z")

</div>

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