Dashboard chart scale changes on refresh

Hi all

I have been scratching my head on this one for a while. I have various values being logged to dashboard charts. When I navigate to a different tab on my dashboard and then return, the x scale of the chart has totally changed and all my data is now in a straight line on the left hand side. Sometimes this happens without changing the tab. In the picture below, the Pressure graph left has been afflicted, and the other graphs are OK.

I am having issues with the time on my RasPi 4 as the company does not allow access to any NTP servers and I must set the time manually each day. However, this problem still occurs.

Any help or pointers would be greatly appreciated.

Regards

Ray

something must be sending a new data point that is being added to the chart at (top left) 10:00 - which then causes the chart to auto-scale for all its old data and the new point.

What is the graph supposed to look like?
What time range is specified in the chart node?
I suggest adding a debug node showing what is going into the chart. Set it to output so System Console then when it goes wrong you can look back through the log and see what it shows.

Hello dceejay and Colin

Thanks for the suggestions. I think I have found the problem. As I cannot use an NTP server to set the time on the RasPi, I do this manually. I have adjusted the Pi time to be the same as my computer clock and the problem seems to be resolved. I can now switch between the dashboard tabs and the history shows correctly.

Thanks for the suggestions, if I have further issues I will try logging to the system console.

Ray

PS. I'm not sure this has anything to do with the issue, but within the dashboard I use a node that provides the date and time top right, which is a javascript call to Date(). I have struggled to get this to show the time in the UK, as selecting the timezone within the toLocaleString does not adjust for summer time. I don't think this is related as this is still an hour out of sync with the graph timescale.

To locale string can be unreliable. Also make sure that the timezone is correct on the pi. If you run date in a terminal it will show the time and zone.
For formatting dates look at node-red-contrib-simpletime and if that is not sufficient then node-red-contrib-moment.

...or just the change node (jsonata) if running NR v1.1

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