OK I have a really weird result in my Historical Charts for my Lightning data.
This is what is being returned in the chart.
As you can see the data goes from the 24th Sept to the 24th Dec. But the actual data on my database goes for 3 months up until 31st January (i.e. October 31st to January 31st) and the column of 32 strikes actually happened on the 11th January 2023 not the 4th December 2022.
I have ran the SQL Query used in the PHP manually on the database table and it returns all the data with the right dates see below.
Somehow (and for the life of me I cannot see how) the right data is getting moved 38 days backwards in time and given the incorrect dates. There is even the right number of columns after the 32 strikes on the chart to bring you to the 31st January (i.e. 20 days).
Anybody got any bright ideas as to how this may be happening?
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Weird Chart dates
Moderator: daj
-
- Posts: 1832
- Joined: Sat 17 Dec 2011 11:55 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 11 x64
- Location: Dorset - UK
- Contact:
Re: Weird Chart dates
This isn't very helpful, but I had this problem once with another graph. For the life of me, I cannot remember what the problem was
-
- Posts: 3294
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Weird Chart dates
Well that made me laugh, so when you remember please let me know as it's driving me nuts!!
- mcrossley
- Posts: 12903
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Weird Chart dates
The lightning data is being sent to the graph as a start datetime, plus the readings for each day. CMX sends each data point as a datetime/value pair.
The start for the lightning data is 1630540800 = 2 September 2021.
The problem with the data format being used (and why CMX does it differently), is by just sending start date, HighCharts assumes that there will be data for every day for then until present, if a day is missing then the data from that point onwards will be shifted one day out, on so on.
So do you have any missing days?
If you do have missing days, then the SQL query you are using must insert null values for the missing days.
The start for the lightning data is 1630540800 = 2 September 2021.
The problem with the data format being used (and why CMX does it differently), is by just sending start date, HighCharts assumes that there will be data for every day for then until present, if a day is missing then the data from that point onwards will be shifted one day out, on so on.
So do you have any missing days?
If you do have missing days, then the SQL query you are using must insert null values for the missing days.
-
- Posts: 3294
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Weird Chart dates
Well spotted Mark I have missing days but why they are missing I am not sure!!
By the way is there an easy way to look at the json data returned by a php routine using mysql, can it be seen in the developer tools?
By the way is there an easy way to look at the json data returned by a php routine using mysql, can it be seen in the developer tools?
-
- Posts: 2503
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Weird Chart dates
Yes, should be able to. PHP will just be returning http responses to your browser that you can inspect using developer tools.