Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

Version 2.0 Beta

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Version 2.0 Beta

Post by meteotortosa »

mcrossley wrote:I see the problem, it is in windrose.js

at line 67 try adding the following...

Code: Select all

                // resize canvas on main page
                document.getElementById('canvas_rose').width = _gaugeSize;
                document.getElementById('canvas_rose').height = _gaugeSize;
so the whole if() statement looks like this...

Code: Select all

            // Get the context of the gauge canvas on the HTML page
            if ($('#canvas_rose').length) {
                _ctxRadarGauge = document.getElementById('canvas_rose').getContext('2d');
                // resize canvas on main page
                document.getElementById('canvas_rose').width = _gaugeSize;
                document.getElementById('canvas_rose').height = _gaugeSize;
            }
Now, its OK. A lot of thanks !!! :clap: :clap:
Screenshot_2013-01-03-20-10-33[1].png
You do not have the required permissions to view the files attached to this post.
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Version 2.0 Beta

Post by meteotortosa »

Hi,

I've a little new problem with my gaugess and Saratoga's script.

http://www.meteotortosa.cat/meteo/wxgaugess.php

It does not show too well some characters

The same page

http://www.meteotortosa.cat/gauges/gauges-ss.html

P.D.: sorry for my english :oops:
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Version 2.0 Beta

Post by gwheelo »

little new problem

Hello meteotortosa -

Which characters? I just took a look at both pages and all characters looked perfect - no problem with accented characters.

Are all characters displaying correctly on my page?

http://www.wheelocknet.net/cumulus/gauges.html?ct

gwheelo
Image
User avatar
mcrossley
Posts: 12951
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Version 2.0 Beta

Post by mcrossley »

Your HTML based page is HTML5 and has:
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

The PHP page is XHTML 1.0 Transitional and has:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

The gauges are HTML5 based, and the supplied scripts are utf-8 encoded.
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Version 2.0 Beta

Post by meteotortosa »

mcrossley wrote:Your HTML based page is HTML5 and has:
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

The PHP page is XHTML 1.0 Transitional and has:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

The gauges are HTML5 based, and the supplied scripts are utf-8 encoded.
How can I fix it?

Thanks
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Version 2.0 Beta

Post by meteotortosa »

gwheelo wrote:little new problem

Hello meteotortosa -

Which characters? I just took a look at both pages and all characters looked perfect - no problem with accented characters.

Are all characters displaying correctly on my page?

http://www.wheelocknet.net/cumulus/gauges.html?ct

gwheelo
Sin título 2.jpg
You do not have the required permissions to view the files attached to this post.
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
mcrossley
Posts: 12951
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Version 2.0 Beta

Post by mcrossley »

Not easy - a full fix is to reformat all the HTML generated by the PHP script to produce HTML5 code rather XHTML Transitional 1.0, and change the meta tag to UTF-8.

The quick and dirty fix is just to change the meta tag - this will probably work with most browsers, but your page will not validate - but there again it probably doesn't validate now.
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Version 2.0 Beta

Post by meteotortosa »

Now, I can't see any gauges, I updated with an old version... :bash:

I'm trying to solve it !! Sorry :oops:
Weather in Tortosa (NE Spain), updated every 15'
Image Image
water01
Posts: 3315
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Version 2.0 Beta

Post by water01 »

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
I had this exact same problem and changed the code to read

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
and the characters interpreted correctly.
David
Image
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Version 2.0 Beta

Post by gwheelo »

How can I fix it?
Meteotortosa -

Your page still renders perfectly for me on Chrome and IE.
meteo tortosa.png
gwheelo
You do not have the required permissions to view the files attached to this post.
Image
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Version 2.0 Beta

Post by William Grimsley »

gwheelo wrote:
How can I fix it?
Meteotortosa -

Your page still renders perfectly for me on Chrome and IE.
meteo tortosa.png
gwheelo
Really? I'm in Chrome and I can see no gauges at all on both of the links he gave us. :bash:
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Version 2.0 Beta

Post by meteotortosa »

gwheelo wrote:
How can I fix it?
Meteotortosa -

Your page still renders perfectly for me on Chrome and IE.
meteo tortosa.png
gwheelo
Did you? 8-)

http://www.meteotortosa.cat/meteo/wxgaugess.php


This one works fine: http://www.meteotortosa.cat/gauges/gauges-ss.html
Weather in Tortosa (NE Spain), updated every 15'
Image Image
water01
Posts: 3315
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Version 2.0 Beta

Post by water01 »

I think this because at http://www.meteotortosa.cat/meteo/wxgaugess.php you have forgotten to upload and make available gauges-ss.css and it therefore cannot build the gauges correctly.
David
Image
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Version 2.0 Beta

Post by gwheelo »

Did you?

No - it displayed perfectly before you changed it to this: here is the result -

https://cumulus.hosiene.co.uk/posting.php ... =21&t=8296#

gw
You do not have the required permissions to view the files attached to this post.
Image
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Version 2.0 Beta

Post by meteotortosa »

water01 wrote:I think this because at http://www.meteotortosa.cat/meteo/wxgaugess.php you have forgotten to upload and make available gauges-ss.css and it therefore cannot build the gauges correctly.
gauges-ss.css is uploaded, you can see here: http://www.meteotortosa.cat/gauges/gauges-ss.html
gwheelo wrote:Did you?

No - it displayed perfectly before you changed it to this: here is the result -

https://cumulus.hosiene.co.uk/posting.php ... =21&t=8296#

gw
I upload an old version of gauges, and now I can fix it :bash:
Weather in Tortosa (NE Spain), updated every 15'
Image Image
Post Reply