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 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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 Windrose

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

Moderator: daj

Post Reply
Bridger
Posts: 60
Joined: Fri 01 Jun 2012 4:58 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 11 Home
Location: New Forest. UK
Contact:

Highcharts Windrose

Post by Bridger »

I am still using Cumulus 1 and have had the Highcharts graphs, including the Windrose, running for sometime. The Windrose had been using only a SQL fulldata table.
I am now uploading realtime.txt to a MySQL realtime table and have managed to get the windrose to dispaly 24hour, 48hour and 7 day graphs except that, when the page initially loads with "Last 24 hours" selected, the graph for "Year to date" is displayed until "Go" is clicked.
I suspect the problem is somewhere in the windrose.js file but I don't have the knowledge to fix it.
Any help would be appreciated.
Windrose is here http://www.fordingbridgeweather.co.uk/s ... ndrose.php
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12695
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 Windrose

Post by mcrossley »

Line 220, change serverData("year") to serverData("24")
Bridger
Posts: 60
Joined: Fri 01 Jun 2012 4:58 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 11 Home
Location: New Forest. UK
Contact:

Re: Highcharts Windrose

Post by Bridger »

Thanks Mark. Simple - when you know how. :clap:
Bridger
Posts: 60
Joined: Fri 01 Jun 2012 4:58 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 11 Home
Location: New Forest. UK
Contact:

Re: Highcharts Windrose

Post by Bridger »

Some of the selections from the drop down menu on my Highcharts Windrose page show the centre "Calm" reading to 15 decimal places rather than the expected 2 decimal places. For example The Last 7 Days selection.
The only place I have been able to find a decimal place setting is in under tooltips in the windrose.js file but this appears to affect only the pop-up table figures.
Any help would be appreciated.
You can view the page here:- http://www.fordingbridgeweather.co.uk/s ... ndrose.php

Thanks,
User avatar
mcrossley
Posts: 12695
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 Windrose

Post by mcrossley »

Bridger wrote: Wed 01 Jan 2020 7:47 pm Some of the selections from the drop down menu on my Highcharts Windrose page show the centre "Calm" reading to 15 decimal places rather than the expected 2 decimal places. For example The Last 7 Days selection.
The only place I have been able to find a decimal place setting is in under tooltips in the windrose.js file but this appears to affect only the pop-up table figures.
Any help would be appreciated.
You can view the page here:- http://www.fordingbridgeweather.co.uk/s ... ndrose.php

Thanks,
Two ways of doing it.
1. In MySQL - change the query to round the value to 1 dp (this is what I do)...

Code: Select all

// start of standard querys
$query =
"SELECT
    dir,
    ROUND(SUM(IF($windSpeedCol < 1, percent, 0)), 1) AS calm,
    ROUND(SUM(IF($windSpeedCol >= 1 AND $windSpeedCol < 4, percent, 0)), 2) AS '1-3 mph',
    ROUND(SUM(IF($windSpeedCol >= 4 AND $windSpeedCol < 8, percent, 0)), 2) AS '4-7 mph',
... etc
2. Change the embedded JavaScript in the page to round the value (untested)...

Code: Select all

						// first element [0] of data is the calm percentage
						var calm = resp.shift().toFixed(1);
Bridger
Posts: 60
Joined: Fri 01 Jun 2012 4:58 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 11 Home
Location: New Forest. UK
Contact:

Re: Highcharts Windrose

Post by Bridger »

Thanks Mark.
There appeared to be no change with Option 1 but Option 2 did the trick. I changed the parameter to 2 to keep the output consistent with the 2 decimal places of the pop up table.

Peter
Post Reply