How to fix the x-axis on chart node

I'm using the node red 0.20.5 version and I have a trouble with the chart node, the x-axis isn't accurate and the timeline it's larger than I specified, so the data looks so close together. This is a image about how it looks:


Can you post the data that you are charting?

They're random numbers from 0 to 10.

Are you specifying timestamps or just feeding values? If timestamps then show us the data you are sending to the chart, if just feeding values then how are you doing that?

I'm just feeding values, I'm doing it with an inject and a function node. The inject node is configured to repeat every second, and here is the code in the function node:

ran = parseInt(Math.random()*10);
msg.topic = "Input1";
msg.payload = ran;
return msg;

All the flow looks like this:

Is the chart showing the correct current time at the right hand side?

Check the time and time zone in the node red machine and the machine running the browser.

Also what is your time zone?

No, both are differents, the time in the right hand side is correct while the time in the chart is approximately eight hours late. My time zone is GMT-6.

Have you checked the time and zone settings? One of them is wrong.


Apparently node red has the correct time, so how can I set the correct time in the chart?

Show us the time and timezone settings on the machine running node red and the machine running the browser. You haven't told us which OS you are using so I can't tell you how to do that. If node red is running in a Docker container then make sure the timezone is correct there.

I'm using a gateway that has node red like a module, here is the log in the node red user's module:

I don't know how to see the time on my browser machine, I'm using Firefox so if you can tell me how to see it, it would be great. Thanks for your help.

You need to look in the docs for the gateway to find out how to properly configure the time and time zone. Possibly it only understands UTC, so you have to give it the UTC time.

It is nothing to do with the browser. If you are using Windows then I expect it is in the clock settings.

The time on the gateway was wrong, the graph is fixed, thank you Colin.

1 Like

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