# Chart's X-Axis Time Values are 00:00:00

**URL:** https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635
**Category:** General
**Created:** [5 March 2019 16:35 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635 "2019-03-05T16:35:53Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![rando](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rando](https://discourse.nodered.org/u/rando)
#### Post date: [5 March 2019 16:35 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/1 "2019-03-05T16:35:53Z")

</div>

I have my node-red project deployed to a raspberry pi that is not connected to the internet. I have a dashboard chart that, when a button is pressed, it populates a "1" value so that a vertical line appears on the chart. The last minute in time is set along the X axis, so the button press corresponds to the exact time.

Intermittently this works great. But recently the time values on the X-Axis are 00:00:00. Has anyone experienced this before? Is it unable to get the system time for some reason (like lack of internet connection)?

Here is what the node properties look like:

 ![properties](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/378a87c1145e22c7ec8f676499880d9cdb9e1058.png)

---

<div class="post-metadata">

### Author: ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)
#### Post date: [5 March 2019 17:11 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/2 "2019-03-05T17:11:28Z")

</div>

The only way to diagnose the problem is if you also post your flow here.

---

<div class="post-metadata">

### Author: ![dhilst](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhilst/32/11254_2.png) [@dhilst](https://discourse.nodered.org/u/dhilst)
#### Post date: [22 August 2019 19:56 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/3 "2019-08-22T19:56:55Z")

</div>

I'm having the same problem. In my case I'm reading the values from a modbus get node, when I navigate to some tab and navigate back again to the previous tab the chart x axis show only 00:00:00 values and the no line, here is a simplified version of the flow that shows the problem

`[{"id":"b06ba29b.716118","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"85853421.561d4","type":"inject","z":"b06ba29b.716118","name":"timer","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":80,"wires":[["9b097e70.d9a468"]]},{"id":"9b097e70.d9a468","type":"function","z":"b06ba29b.716118","name":"Temperatura de saida do ar","func":"msg.payload = { \n 'fc': 3,\n 'unitid': 1,\n 'address': 260,\n 'quantity': 1 \n} \nreturn msg;","outputs":1,"noerr":0,"x":310,"y":100,"wires":[["c3e7f47c.687488"]]},{"id":"c3e7f47c.687488","type":"modbus-flex-getter","z":"b06ba29b.716118","name":"Modbus/TCP Get","showStatusActivities":true,"showErrors":true,"logIOActivities":false,"server":"2c330275.c05d1e","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":580,"y":80,"wires":[["60ebfc0b.2c8304"],[]]},{"id":"60ebfc0b.2c8304","type":"function","z":"b06ba29b.716118","name":".[0]/10","func":"msg.payload = msg.payload[0] / 10;\nreturn msg;","outputs":1,"noerr":0,"x":770,"y":80,"wires":[["60863aaf.985db4"]]},{"id":"60863aaf.985db4","type":"change","z":"b06ba29b.716118","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Saída","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":30,"wires":[["f9b48201.c84c98"]]},{"id":"f9b48201.c84c98","type":"ui_chart","z":"b06ba29b.716118","name":"","group":"1029c925.810a8f","order":1,"width":0,"height":0,"label":"Saída e retorno do ar (℃)","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"40","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#b4201f","#2711d4","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1180,"y":50,"wires":[[]]},{"id":"2c330275.c05d1e","type":"modbus-client","z":"","name":"Mecalor","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.0.201","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"5000","reconnectTimeout":"5000"},{"id":"1029c925.810a8f","type":"ui_group","z":"","name":"Default","tab":"daa5b4e8.6d38a8","disp":true,"width":"6","collapse":false},{"id":"daa5b4e8.6d38a8","type":"ui_tab","z":"","name":"Teste","icon":"dashboard","disabled":false,"hidden":false}]`

Here a screenshot before and after the problem  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/4d24f4fb6a8e95ba45cf9f4d1f7b82150859fa2e.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/4983173290c010faccf447a0a834a6fc428da7a5.png)

Redeploy doens't fix the problem, but if I send `[]` to the chart, it starts to plot correctly again

---

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [23 August 2019 20:43 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/4 "2019-08-23T20:43:55Z")

</div>

HI Daniel,

I could not reproduce the issue as you described.

Is it possible that your flow is delivering negative values to the chart node ? Note that in the node configuration is set to Y min = 0 and Ymax = 40. If you deliver values outside this range I would expect to see no points being plotted. A debug node could capture the payload values delivered to the UI\_chart for your analysis. Makes sense ?

---

<div class="post-metadata">

### Author: ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)
#### Post date: [23 August 2019 21:04 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/5 "2019-08-23T21:04:41Z")

</div>

Does not reproduce for me too but I think it is reasonable if you tell us about your environment and versions of soft you are using. It may make some difference.

---

<div class="post-metadata">

### Author: ![dhilst](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhilst/32/11254_2.png) [@dhilst](https://discourse.nodered.org/u/dhilst)
#### Post date: [23 August 2019 21:23 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/6 "2019-08-23T21:23:34Z")

</div>

I'm running on Raspberry PI, Raspian 9, nodered 0.19.4 installed with default apt-get, the dashboard version:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/d71ecbae153582a8d8f2b594df41c07a39f5766c.png)

all my line charts are showing this behavior

Andrei, even if this would be the case, this doesn't explains why the X axis are all `00:00:00`.

I could reproduce this without depend on modbus

`[{"id":"cedb3ea6.89e61","type":"ui_text","z":"8061d389.d01cd","group":"1029c925.810a8f","order":1,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":490,"y":200,"wires":[]},{"id":"1029c925.810a8f","type":"ui_group","z":"","name":"Default","tab":"daa5b4e8.6d38a8","disp":true,"width":"6","collapse":false},{"id":"daa5b4e8.6d38a8","type":"ui_tab","z":"","name":"Teste","icon":"dashboard","disabled":false,"hidden":false}]`

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

Is there anything that I can do to troubleshoot this further?

---

<div class="post-metadata">

### Author: ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)
#### Post date: [23 August 2019 21:30 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/7 "2019-08-23T21:30:52Z")

</div>

And if you add info about the browser, someone with similar equipment can try and then the issue can be narrowed down. Unfortunately no PI equipment available for me.

---

<div class="post-metadata">

### Author: ![dhilst](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhilst/32/11254_2.png) [@dhilst](https://discourse.nodered.org/u/dhilst)
#### Post date: [23 August 2019 21:39 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/8 "2019-08-23T21:39:05Z")

</div>

I tried Chrome Version 73.0.3683.103 (Official Build) (64-bit) and Firefox 66.0.3 (64-bit), both for linux. I'll ask my fellows to try with another browsers too. Also, I have a raspberry here, I will try to reproduce

We're using chartjs with angular, is there a way to log some debug info? (I'm not very versed in node/angular/chartjs but I can try)

Regards!

---

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [23 August 2019 22:35 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/9 "2019-08-23T22:35:21Z")

</div>

The latest flow you posted has only one node. Please post again so we can have a look.

---

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [23 August 2019 23:17 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/10 "2019-08-23T23:17:29Z")

</div>

> [@dhilst](#):
>
> Andrei, even if this would be the case, this doesn't explains why the X axis are all `00:00:00` .

One thing that can explain the zeros is the X axis is your flow injecting `msg.timestamp` with value 0. This is just to illustrate that it is possible such thing happening. It should not be your case as you would easily catch that with a debug node.

A good place for adding a debug node is in the output of the ui\_chart node. This way you could view the history of the data in the debug panel.

---

<div class="post-metadata">

### Author: ![dhilst](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhilst/32/11254_2.png) [@dhilst](https://discourse.nodered.org/u/dhilst)
#### Post date: [26 August 2019 16:57 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/11 "2019-08-26T16:57:42Z")

</div>

Good idea Andrei,

I'll try that today!

---

<div class="post-metadata">

### Author: ![dhilst](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhilst/32/11254_2.png) [@dhilst](https://discourse.nodered.org/u/dhilst)
#### Post date: [26 August 2019 19:46 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/12 "2019-08-26T19:46:20Z")

</div>

Here is the earlier exported node

`[{"id":"8061d389.d01cd","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"74e570d7.05b4c","type":"inject","z":"8061d389.d01cd","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":140,"wires":[["5d653255.f498cc"]]},{"id":"5d653255.f498cc","type":"random","z":"8061d389.d01cd","name":"","low":"1","high":"10","inte":"true","property":"payload","x":340,"y":140,"wires":[["ca9b77b1.27e8b8","cedb3ea6.89e61"]]},{"id":"ca9b77b1.27e8b8","type":"ui_chart","z":"8061d389.d01cd","name":"","group":"1029c925.810a8f","order":0,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":490,"y":140,"wires":[[]]},{"id":"cedb3ea6.89e61","type":"ui_text","z":"8061d389.d01cd","group":"1029c925.810a8f","order":1,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":490,"y":200,"wires":[]},{"id":"dd667a04.0d2ba8","type":"inject","z":"8061d389.d01cd","name":"","topic":"","payload":"[]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":340,"y":70,"wires":[["ca9b77b1.27e8b8"]]},{"id":"1029c925.810a8f","type":"ui_group","z":"","name":"Default","tab":"daa5b4e8.6d38a8","disp":true,"width":"6","collapse":false},{"id":"daa5b4e8.6d38a8","type":"ui_tab","z":"","name":"Teste","icon":"dashboard","disabled":false,"hidden":false}]`

---

<div class="post-metadata">

### Author: ![dhilst](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhilst/32/11254_2.png) [@dhilst](https://discourse.nodered.org/u/dhilst)
#### Post date: [26 August 2019 21:03 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/13 "2019-08-26T21:03:20Z")

</div>

I tried to reproduce this in my desktop, no success. I have a raspberry 3 here, but no SD card 😮 I will try to find one, or buy one, but I will not get this working today 😕

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [27 August 2019 09:30 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/14 "2019-08-27T09:30:04Z")

</div>

> [@dhilst](#):
>
> nodered 0.19.4

I don't know if this will matter but NR is now at v0.20.7 you might try an update on your pi using the directions at [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [27 August 2019 10:30 UTC](https://discourse.nodered.org/t/charts-x-axis-time-values-are-0000/8635/15 "2019-08-27T10:30:57Z")

</div>

that shouldn't have an effect on dashboard per se. it'll be more down to the formatting of the data being sent in... -
