X axis time won't change as per the need

I am using ADAM 6717 for obtaining data from the sensors.

I have the need to plot the chart to show the incoming datas. Thought I make the X axis to last 1 hour or 1 day or minutes, I do not have any change in the chart displayed.

This is the chart input

This is the graph output.
forum2

Can any of you help me to get the X axis as required? I would need it for one day and to show the value at the right time. Here the X axis shows 5 am but I am obtaining the input at 11 am. How to get the data on a acurate time?

How are you adding data to the chart?

The data from the chart is coming from a Sensor measuring the pressure.

Yes, you said that, but what exact messages are you sending to the chart. Add a debug node showing what is going to the chart. Set is to Output Complete Message and show us what it says.

Is the timestamp at the right hand side of the chart showing the correct time?

forum 3

I suppose the output shows the current time.

When the chart was given that message did it add a point at the right hand side with value 0.317?

yes, it added to its right a point with value 0.317

So the new value has been added at the correct time. So what is the problem?

Possibly you are confused by the fact that when you set a time range greater than the time range for the data available it does not initially increase the range shown. You have to wait for the chart to fill up. So if, for example, you set the range to one hour and start with an empty chart then it will take an hour for the chart to fill up and show the complete hour. Before that time it will show the oldest data it has at the left hand side.

I got it now !
thanks for explaining it to me.
But, why does the time shown here in the chart is different from the actual time?

Can I have the X axis to always show from a specific start time to end time? for eg: from one day, or half day? and how to get the correct time value on the x axis?

Do you mean you don't want to send it live data but instead want to fill the chart with existing historical data?

You said that when you passed it the value 0.317 then the point was added at the correct timestamp at the right hand side of the chart.

I got the value added to the right, but not at the correct time.

  1. My X axis shows a different time value from the real time. (as in my first msg here at the top) How to get the same time in hours and minutes on the chart as that of the real time. I have an error showing the values at 5 am when the readings were taken at 11 am.

  2. Is it possible to have a chart with constant X axis from 7 am till 17 pm and data getting updated in it? or so. This was my next question

You said earlier that the right hand side of the chart shows the correct current time. Is that not right? If not then check the time and timezone settings on the device running node red and the device running the browser. Probably one of them is wrong.
Let's deal with the second question once you have the chart working.

Thank you for your patience and answers.

The timestamp at the debug node with the output complete message shows the right time, but the chart shows a different time. How come this can happen?

I have also tried to open it in different browsers. But still the same error persists.

As I said. If the timestamp at the right hand side of the chart is not correct (so when you took the screenshot at the start the time was not just after 1PM) then you have either the time or timezone is wrong in the device running node-red or in the one running the browser. That assumes you are running an up to date version of node-red-dashboard of course, though I don't remember any bugs that would cause that.

Is the time at the right hand side of the chart a whole number of hours wrong? If so is it the same as your offset from UTC?

1 Like

I get to understand now, the time on the right side is the current time!
Then I get the time correct to the current time as it is 3 45 PM (GMT+1) and the chart has the following view.
forum 4

But, I made a change in the input data now, but the change is shown on top of 9 am instead of 3 45 pm. Do you think I am missing something again?

As I have said multiple times before, you almost certainly have the wrong time or timezone set somewhere. Where is node-red running and where is the browser running? If on each of those systems (not in node-red) you show the current time and zone what do they say?

Also how did you install node-red? Is it a Docker install or running in a VM for example?

The Node-red is installed on a ADAM 6717 - gateway module, which is a virtual machine. But the settings of this has been checked once you mentioned about the time settings.

On my PC as well, the time zone is correctly set to the GMT+1.

That is saying the current time is 16:22:27 + 8 hours so that is the problem.

I would have expected it to be +1, matching the time zone