Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See the Wiki for download

Windrose popup different to gauge.

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

Post Reply
UncleBuck
Posts: 36
Joined: Sat 29 Dec 2012 10:27 pm
Weather Station: Davis VP2+
Operating System: MAC Mini - OSX El Capitan
Location: Victoria, Australia

Windrose popup different to gauge.

Post by UncleBuck » Mon 02 Oct 2017 8:29 pm

Not sure what is happening here but the popup windrogse graph is quite different to the actual gauge.
The gauge is reading correctly as I have confirmed the direction it is facing when I took this screen capture and there has been little to no wind over night.
Any ideas as to what I have set up incorrectly?
2017-10-03_07-21-41.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
mcrossley
Posts: 5210
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Windrose popup different to gauge.

Post by mcrossley » Tue 03 Oct 2017 6:56 pm

Are you using the SQL or the tag version of the graphs?

UncleBuck
Posts: 36
Joined: Sat 29 Dec 2012 10:27 pm
Weather Station: Davis VP2+
Operating System: MAC Mini - OSX El Capitan
Location: Victoria, Australia

Re: Windrose popup different to gauge.

Post by UncleBuck » Wed 04 Oct 2017 1:47 am

I am using the SQL version.
I changed the code so it uses the 'wlatest' data rather than the 'wspeed' and the result is much closer now to the gauge.

User avatar
mcrossley
Posts: 5210
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Windrose popup different to gauge.

Post by mcrossley » Wed 04 Oct 2017 11:30 am

The other thing to bear in mind - the Cumulus data will generally be over a more recent period of time.
The SQL graph will by default show a wind rose for the last 24 hours.
The JSON version will (assumption it is then same as C1) be the last 3,600 readings from the station - how long that is depends on the station. But for a VP2 by my reckoning that will be somewhere over 1 hour?

User avatar
laulau
Posts: 521
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Windrose popup different to gauge.

Post by laulau » Wed 04 Oct 2017 1:25 pm

Hi,
Mine isn't sized correctly !
Windrose.jpg
And i'm not able to find where to change that.

When called directly http://meteo.laurentmey.fr/graph/windrose.png it's ok.

Please help
You do not have the required permissions to view the files attached to this post.
Laurent

Image

User avatar
mcrossley
Posts: 5210
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Windrose popup different to gauge.

Post by mcrossley » Wed 04 Oct 2017 2:03 pm

laulau wrote:Hi,
Mine isn't sized correctly !
Windrose.jpg
And i'm not able to find where to change that.

When called directly http://meteo.laurentmey.fr/graph/windrose.png it's ok.

Please help
This has been covered before, it involves adding a bit of custom code, but I forget the details. Try a search of the forum, or maybe somebody who has made the change can chip in?...

User avatar
ConligWX
Posts: 728
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.5 Stretch
Location: Bangor, NI
Contact:

Re: Windrose popup different to gauge.

Post by ConligWX » Wed 04 Oct 2017 2:27 pm

you need to edit the gauges.js

Add the following:

Code: Select all

         $('#imgtip10_img').css({width: 400, height: 400}); //Re-size WindRose tip

to the gauges.js at the bottom like so.....

Code: Select all

      if ($tooltip) { // add mouseenter to this tooltip (only if event hasn't already been added)
          $tooltip.mouseenter(function () {
                        ddimgtooltip.hidebox($, $(this));
                    });
                }
            });
         $('#imgtip10_img').css({width: 400, height: 400}); //Re-size WindRose tip
        }
    };
I set mine however to 300 x 300
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2 Plus - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS Templates

User avatar
laulau
Posts: 521
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Windrose popup different to gauge.

Post by laulau » Wed 04 Oct 2017 5:20 pm

Toxic17 wrote:you need to edit the gauges.js

Add the following:

Code: Select all

         $('#imgtip10_img').css({width: 400, height: 400}); //Re-size WindRose tip

to the gauges.js at the bottom like so.....

Code: Select all

      if ($tooltip) { // add mouseenter to this tooltip (only if event hasn't already been added)
          $tooltip.mouseenter(function () {
                        ddimgtooltip.hidebox($, $(this));
                    });
                }
            });
         $('#imgtip10_img').css({width: 400, height: 400}); //Re-size WindRose tip
        }
    };
I set mine however to 300 x 300
Thanks :D :clap:
Laurent

Image

Post Reply