Page 1 of 1

Windrose popup different to gauge.

Posted: Mon 02 Oct 2017 8:29 pm
by UncleBuck
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

Re: Windrose popup different to gauge.

Posted: Tue 03 Oct 2017 6:56 pm
by mcrossley
Are you using the SQL or the tag version of the graphs?

Re: Windrose popup different to gauge.

Posted: Wed 04 Oct 2017 1:47 am
by UncleBuck
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.

Re: Windrose popup different to gauge.

Posted: Wed 04 Oct 2017 11:30 am
by mcrossley
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?

Re: Windrose popup different to gauge.

Posted: Wed 04 Oct 2017 1:25 pm
by laulau
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

Re: Windrose popup different to gauge.

Posted: Wed 04 Oct 2017 2:03 pm
by mcrossley
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?...

Re: Windrose popup different to gauge.

Posted: Wed 04 Oct 2017 2:27 pm
by ConligWX
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

Re: Windrose popup different to gauge.

Posted: Wed 04 Oct 2017 5:20 pm
by laulau
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: