Page 1 of 1

Rain Data Missing on Bar Graph Every 31st of Month

Posted: Wed Jul 04, 2018 6:18 pm
by Sperry Russ
I just discovered while importing and checking some data that every month that has 31 days the rain data is missing on the bar graph. It shows up below the bar graph in the detailed info.

Graph1.JPG
Graph1.JPG (47.44 KiB) Viewed 15106 times
Graph2.jpg
Graph2.jpg (40.05 KiB) Viewed 15106 times

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Sun Jul 08, 2018 8:08 pm
by Dehatter
Sorry...but for the life of me, I cannot find the graph you show!! LOL

Can you provide the block/plugin where it is?

Tom

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Sun Jul 08, 2018 9:05 pm
by Sperry Russ
As far as I know it is not a block or plugin. Just part of the template.

Go to the menu, then click Weather Station, then click Reports. Under the Monthly Reports choose the month and year, click Ok. Then click on precipitation. Then scroll down the page.

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Sat Jul 14, 2018 7:07 am
by Dehatter
Well by gosh you are right!

Mine does it too.

I have never gone to that report.

Tom

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Sat Jul 14, 2018 1:44 pm
by Sperry Russ
I was using that report to check data I was importing.

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Sat Jul 21, 2018 9:30 pm
by Dehatter
Jachym. Any ideas on this one?

Tom

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Wed Aug 01, 2018 8:47 am
by Johnny
I've noticed the exact same problem from 9.6mm of rainfall we had on the 31st July 2018, it shows in the total and in the detail below the graph, but no bar appears on the graph.

31st-no-rain-on-graph.jpg
31st-no-rain-on-graph.jpg (26.53 KiB) Viewed 14933 times

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Wed Aug 01, 2018 7:41 pm
by wx_jon
I found the pesky bug. Change line 1163 of pages/station/reportMonthlyLoad.php from

Code: Select all

for($i=1;$i<$numberDays;$i++){
to

Code: Select all

for($i=1;$i<=$numberDays;$i++){
It's just a '<=' sign!
There's also another identical change at line 1280 which will add the 31st of the month to the range bar charts on temperature and other variables.

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Wed Aug 01, 2018 9:47 pm
by Sperry Russ
Okay, thanks Jon.

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Thu Aug 02, 2018 9:08 am
by Johnny
wx_jon wrote: Wed Aug 01, 2018 7:41 pm I found the pesky bug.
Hi Jon, thank you - it worked. I've know idea how you found that one character missing in all those lines of code, but it's done the trick.

31st-yes-rain-on-graph.jpg
31st-yes-rain-on-graph.jpg (7.41 KiB) Viewed 14907 times
Happy.jpg
Happy.jpg (11.07 KiB) Viewed 14907 times

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Mon Aug 06, 2018 6:08 am
by Dehatter
All I can say is Nice One!!

Thank you very much,

Tom

Re: Rain Data Missing on Bar Graph Every 31st of Month

Posted: Tue Aug 07, 2018 5:02 pm
by LOBWX
Serious Dig Dug.
Thanks wx_jon.