Highcharts Question
Posted: Fri 20 Aug 2021 7:15 pm
I've been spending some time playing around with some highcharts graphs recent, and got a little carried away..
https://warehamwx.co.uk/graphs_monthly.php
I have plans for a few more, one of them was using windbarb.js
I did get a windbarb chart working, but I ran in to a problem with it, so I scrapped it. I wanted to try again, but thought I'd see if anyone here has used it.
I used HighWindGust and HWindGBear from the Dayfile table in SQL, and put it in to an array. I put a chart together for area, as well as the windbarbs. I noticed that the windbarbs had a lot of pennants, meaning that it was showing high winds. Sure enough, the tooltips were showing 'hurricane' and 'violent storm'. After some faffing around, I realised that the windbarb.js is using metres per second. It was interpreting a 56mph gust as 56m/s (125mph).
I then thought that perhaps I might be able to convert my readings from mph to m/s, then only show the beaufort description in the windbarb tooltip. I did just that and thought I'd solved it. However, the windbarbs on the charts were still showing too many pennants, which didn't relate to the actual wind speeds.
It now seems that coding may be needed for the barbs themselves, to properly do a conversion so that the correct pennants show up on them. It's not as simple as just converting the actual value to m/s.
I've had a look, but I cannot seem to find any information on it. I find it rather strange that they would lock it to a single unit?!
Simple question; Has anyone managed to do it?
https://warehamwx.co.uk/graphs_monthly.php
I have plans for a few more, one of them was using windbarb.js
I did get a windbarb chart working, but I ran in to a problem with it, so I scrapped it. I wanted to try again, but thought I'd see if anyone here has used it.
I used HighWindGust and HWindGBear from the Dayfile table in SQL, and put it in to an array. I put a chart together for area, as well as the windbarbs. I noticed that the windbarbs had a lot of pennants, meaning that it was showing high winds. Sure enough, the tooltips were showing 'hurricane' and 'violent storm'. After some faffing around, I realised that the windbarb.js is using metres per second. It was interpreting a 56mph gust as 56m/s (125mph).
I then thought that perhaps I might be able to convert my readings from mph to m/s, then only show the beaufort description in the windbarb tooltip. I did just that and thought I'd solved it. However, the windbarbs on the charts were still showing too many pennants, which didn't relate to the actual wind speeds.
It now seems that coding may be needed for the barbs themselves, to properly do a conversion so that the correct pennants show up on them. It's not as simple as just converting the actual value to m/s.
I've had a look, but I cannot seem to find any information on it. I find it rather strange that they would lock it to a single unit?!
Simple question; Has anyone managed to do it?