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
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
Highcharts Graphs
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Highcharts Graphs
Also setting up a view will not do anything for the compute time. BTW, I just added a new sunshine chart - from yet another intermediate table. If I get time the Sun by hour data can be derived easily from the new Sun by Month & Hour table, but for now I'm running both. Let me know if you want the query to build the new table.
- BeaumarisWX
- Posts: 375
- Joined: Mon 09 Apr 2012 2:38 pm
- Weather Station: Davis VP2 Plus - 24hr FARS
- Operating System: Windows 10 Pro Hades Canyon
- Location: Beaumaris, Tasmania, AU
- Contact:
Re: Highcharts Graphs
Hi Mark,
Yes for sure matey, that looks brilliant. What a great way to display it, your a legend.
regards,
Yes for sure matey, that looks brilliant. What a great way to display it, your a legend.
regards,
Tony Beaumaris, Tasmania (AUS)
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Highcharts Graphs
Sorry Tony, I was playing around with a few things. The sunshine by month and hour table is defined as:
The insert statements are:
The TZ settings will need adapting to your specific TZ as before - as will the solar data start date if it does not correspond with the general data start date, otherwise the t.LogDateTime > "2013-4-14" clause can be deleted.
Code: Select all
month - int(2)
hour - int(2)
sun - decimal (5,2)
percent - decimal(3,1)
Code: Select all
DELETE FROM <db_name>.`sunbymonthhour`;
INSERT INTO <db_name>.`sunbymonthhour`
SELECT month,
hour,
sum(sun),
round(sum(sun) / count(*) * 100, 1)
FROM (
SELECT month(CONVERT_TZ(t.LogDateTime,"EUROPE/London","UTC")) AS month,
hour(CONVERT_TZ(t.LogDateTime,"EUROPE/London","UTC")) AS hour,
(min(n.HrsSunShine) - min(t.HrsSunShine)) AS sun
FROM <db_name>.<logdata_table_name> as t
JOIN <db_name>.<logdata_table_name> as n
ON t.LogDateTime = date_sub(n.LogDateTime, INTERVAL 1 hour)
WHERE t.LogDateTime > "2013-4-14"
AND hour(t.LogDateTime) BETWEEN 2 AND 22
GROUP BY date_format(t.LogDateTime, "%Y%m%d%H")
) as x
GROUP BY month, hour;
- BeaumarisWX
- Posts: 375
- Joined: Mon 09 Apr 2012 2:38 pm
- Weather Station: Davis VP2 Plus - 24hr FARS
- Operating System: Windows 10 Pro Hades Canyon
- Location: Beaumaris, Tasmania, AU
- Contact:
Re: Highcharts Graphs
Hi Mark,
Brilliant thank you, think I got it all running OK, seems to be correct. http://hrvistaweather.com/weather/wxhis ... rtsAll.php
In historicGraphs.js I changed:
From:
To:
removing the " You can enable/disable the individual series plots by clicking on them in the graph legend."
regards,
Brilliant thank you, think I got it all running OK, seems to be correct. http://hrvistaweather.com/weather/wxhis ... rtsAll.php
In historicGraphs.js I changed:
From:
Code: Select all
var temperatureHourlyMonth = function () {
try {
chart.showLoading();
} catch (e) {}
$('#graph_description').text(
'The average temperature for each hour of the day plotted per month. You can enable/disable the individual series plots by clicking on them in the graph legend.'
);
Code: Select all
var temperatureHourlyMonth = function () {
try {
chart.showLoading();
} catch (e) {}
$('#graph_description').text(
'The average temperature for each hour of the day plotted per month.'
);
removing the " You can enable/disable the individual series plots by clicking on them in the graph legend."
regards,
Tony Beaumaris, Tasmania (AUS)
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
-
- Posts: 43
- Joined: Sat 29 Dec 2012 10:27 pm
- Weather Station: Davis VP2+
- Operating System: MAC Mini - OSX El Capitan
- Location: Victoria, Australia
Re: Highcharts Graphs
I know this thread is now over a month since the last post but thought I would chime in on Tony's problem with time zone conversions.
If the hosting providers version of MySQL does not have the Timezone tables populated then you can't use the Australia/Hobart format for time conversion. The only way I have found around this was as follows:
Check the time that MySQL is using by using a simple select statement and returning now(). (in my case it was AEST)
Then use convert_tz(LogDateTime,"SYSTEM","+10:00")
Col.
If the hosting providers version of MySQL does not have the Timezone tables populated then you can't use the Australia/Hobart format for time conversion. The only way I have found around this was as follows:
Check the time that MySQL is using by using a simple select statement and returning now(). (in my case it was AEST)
Then use convert_tz(LogDateTime,"SYSTEM","+10:00")
Col.
Colin
Point Cook Weather
Point Cook Weather
-
- Posts: 43
- Joined: Sat 29 Dec 2012 10:27 pm
- Weather Station: Davis VP2+
- Operating System: MAC Mini - OSX El Capitan
- Location: Victoria, Australia
Re: Highcharts Graphs
Just thinking a little more on that and realised even that is wrong.
MX is storing the log file date as daylight time, MySQL is set to use standard time so I will have to think a little more on that.
MX is storing the log file date as daylight time, MySQL is set to use standard time so I will have to think a little more on that.
Colin
Point Cook Weather
Point Cook Weather
-
- Posts: 43
- Joined: Sat 29 Dec 2012 10:27 pm
- Weather Station: Davis VP2+
- Operating System: MAC Mini - OSX El Capitan
- Location: Victoria, Australia
Re: Highcharts Graphs
Hi Mark,
Just a quick question for clarification purposes.
In your scripts you use several table names that are not what CMX creates as the part of the SQL setup. Could you please provide your equivalent table names for the following CMX tables:
CMX table Your table
Dayfile
Monthly
Realtime
If you could also provide the names of other tables used for these graphs that are not part of a standard CMX setup that would fantastic.
Regards,
Just a quick question for clarification purposes.
In your scripts you use several table names that are not what CMX creates as the part of the SQL setup. Could you please provide your equivalent table names for the following CMX tables:
CMX table Your table
Dayfile
Monthly
Realtime
If you could also provide the names of other tables used for these graphs that are not part of a standard CMX setup that would fantastic.
Regards,
Colin
Point Cook Weather
Point Cook Weather
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Highcharts Graphs
Hi Colin, I think they are pretty self explanatory, I try and use the standard table names in released scripts, but sometimes forget!
Dayfile=daydata
Monthly=fulldata
Realtime=realtime
I use other tables and views for various bits'n'bobs...
facts
sunbyhour
sunbymonthhour
tide
monthlytemps (view)
and some triggers (post-insert on daydata, and pre-insert on realtime) to generate various derived values (a running 10 minute average UV-I that Cumulus does not create for instance).
Dayfile=daydata
Monthly=fulldata
Realtime=realtime
I use other tables and views for various bits'n'bobs...
facts
sunbyhour
sunbymonthhour
tide
monthlytemps (view)
and some triggers (post-insert on daydata, and pre-insert on realtime) to generate various derived values (a running 10 minute average UV-I that Cumulus does not create for instance).
-
- Posts: 1808
- Joined: Sat 17 Dec 2011 11:55 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 11 x64
- Location: Dorset - UK
- Contact:
Re: Highcharts Graphs
Hi folks.
I wonder if somebody could spare five minutes?
I've just setup the realtime Highcharts on my server, and the way I decided to create the realtime log was through TNET's php script & running a cronjob every minute. I thought I had cracked it, until I saw the first update..
The realtimelog.txt is updating fine: http://www.warehamwx.com/cu/realtime.log
When the page loads, the graphs create fine, when the update comes, the timestamp at the bottom of the graph turns in to years 2006 - 2016: http://www.warehamwx.com/cu/realtime.log
I'm a bit stumped and confused now!
Many thanks.
I wonder if somebody could spare five minutes?
I've just setup the realtime Highcharts on my server, and the way I decided to create the realtime log was through TNET's php script & running a cronjob every minute. I thought I had cracked it, until I saw the first update..
The realtimelog.txt is updating fine: http://www.warehamwx.com/cu/realtime.log
When the page loads, the graphs create fine, when the update comes, the timestamp at the bottom of the graph turns in to years 2006 - 2016: http://www.warehamwx.com/cu/realtime.log
I'm a bit stumped and confused now!
Many thanks.
-
- Posts: 1808
- Joined: Sat 17 Dec 2011 11:55 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 11 x64
- Location: Dorset - UK
- Contact:
Re: Highcharts Graphs
I solved my own problem in the end. It was the date format in TNET's script.. It produced 2016-03-13 in the realtimelog, while the realtime.txt is 13/03/16
I changed a line in the realtimelog.php to:
The dates match, and the graph now updates and executes with no issues.
I changed a line in the realtimelog.php to:
Code: Select all
$data="DD/MM/YY"; echo "20" . substr($data,6,2) . "-" . substr($data,0,2) . "-" . substr($data,3,2);
-
- Posts: 96
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Highcharts Graphs
Hi Mark,
I like your historic highcharts on your website. I have copied the necessary files to my own site. But I have a small problem. If I press under the column Rainfall on the Drill Down button it keeps saying Loading...
In the javascript console it says:
Uncaught TypeError: Cannot read property 'length' of undefined historicGraphs.js:1610.
It is about this section:
This variable resp.months[j][2].length is undefined.
If I comment this section the graph is shown but the second drill doesn't show anything.
Do you know what is wrong?
Dinant
I like your historic highcharts on your website. I have copied the necessary files to my own site. But I have a small problem. If I press under the column Rainfall on the Drill Down button it keeps saying Loading...
In the javascript console it says:
Uncaught TypeError: Cannot read property 'length' of undefined historicGraphs.js:1610.
It is about this section:
Code: Select all
for (k = 0; k < resp[i].months[j][2].length; k++) {
options.drilldown.series[options.drilldown.series.length-1].data[k] = {
name: resp[i].months[j][2][k][0] + '-' + resp[i].months[j][0],
y : resp[i].months[j][2][k][1]
};
}
If I comment this section the graph is shown but the second drill doesn't show anything.
Do you know what is wrong?
Dinant
-
- Posts: 96
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Highcharts Graphs
Forgot to mention: my website: http://www.weerstation-markelo.nl/test.php
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Highcharts Graphs
Your historicRainByYear.php script is not returning data for the first months of 2013, until August 17th...
Try changing the PHP...
I had put that code into my historicSunshineByYear.php as that starts mid-year and I obviously hit the same issue, but it looks like I forgot to go back and fix the rainfall script as my rain records happen to start in January 2010.
Code: Select all
[{"year":"2013","total":371.8,"months":[["Jan",0],["Feb",0],["Mar",0],["Apr",0],["May",0],["Jun",0],["Jul",0],["Aug",12.8,[[17,0],
Code: Select all
from this...
while ($m < (int)$monthRow[1]) {
$valTot[$m - 1] = array($months[$m-1], 0);
$m++;
}
to this...
while ($m < (int)$monthRow[1]) {
$valTot[$m - 1] = array($months[$m-1], 0, array());
$m++;
}
-
- Posts: 96
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Highcharts Graphs
That does the job. Thanks.
Dinant
Dinant
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Highcharts Graphs
Great!
PS: You don't need to copyright me for the graphs - but the acknowledgement is nice, thanks.
PS: You don't need to copyright me for the graphs - but the acknowledgement is nice, thanks.