Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
water01
Posts: 3259
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Weird Chart dates

Post by water01 »

OK I have a really weird result in my Historical Charts for my Lightning data.

This is what is being returned in the chart.

Image

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.

Image

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?
David
Image
Mapantz
Posts: 1823
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

Post by Mapantz »

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 :lol:
Image
water01
Posts: 3259
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

Post by water01 »

Mapantz wrote: Wed 01 Feb 2023 2:46 pm 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 :lol:
:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:

Well that made me laugh, so when you remember please let me know as it's driving me nuts!!
David
Image
User avatar
mcrossley
Posts: 12778
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

Post by mcrossley »

Do you have a link to the page?
freddie
Posts: 2483
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

Post by freddie »

Freddie
Image
User avatar
mcrossley
Posts: 12778
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

Post by mcrossley »

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.
water01
Posts: 3259
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

Post by water01 »

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?
David
Image
freddie
Posts: 2483
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

Post by freddie »

water01 wrote: Wed 01 Feb 2023 6:43 pm 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?
Yes, should be able to. PHP will just be returning http responses to your browser that you can inspect using developer tools.
Freddie
Image
Post Reply