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 4017) - 17 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

Steel Gauges on a mobile

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

The PIT
Posts: 260
Joined: Thu 10 Dec 2009 6:15 pm
Weather Station: Davis VP2 Wireless
Operating System: Windows 7 32 bit
Location: England
Contact:

Re: Steel Gauges on a mobile

Post by The PIT »

Got the graphs updating the wiki doesn't mention additional settings are needed in the cumulus ftp setup. Could do with that adding in and a section on upgrading would be useful as well.
Anyway back to the original issue moving the graphics .
Based in Sunny Old Sheffield South Yorkshire England

www.sheffieldweather.co.uk
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Steel Gauges on a mobile

Post by water01 »

It certainly does mention the fact that extra files have to be Ftp'd in the Wiki. Read "Quick Start Guide for Cumulus Uses" http://wiki.sandaysoft.com/a/SteelSerie ... his_too.29
David
Image
The PIT
Posts: 260
Joined: Thu 10 Dec 2009 6:15 pm
Weather Station: Davis VP2 Wireless
Operating System: Windows 7 32 bit
Location: England
Contact:

Re: Steel Gauges on a mobile

Post by The PIT »

It doesn't it just mentions two lines to be altered. Doesn't even mention the tooltip graphs. Not worth have a bargy over though.
Just like to be able to move those graphs for mobile device such as phones.
Based in Sunny Old Sheffield South Yorkshire England

www.sheffieldweather.co.uk
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Steel Gauges on a mobile

Post by mcrossley »

This is what I have in the current source to position the graphs on narrow screens (there is the option to not display the graphs at all on mobile devices)...

Code: Select all

        positiontooltip: function ($, $tooltip, e) {
            var x = e.pageX + this.tooltipoffsets[0],
                y = e.pageY + this.tooltipoffsets[1],
                tipw = $tooltip.outerWidth(),
                tiph = $tooltip.outerHeight(),
                wHght = $(window).height(),
                dTop = $(document).scrollTop();

            x = (x + tipw > $(document).scrollLeft() + $(window).width()) ? x - tipw - (ddimgtooltip.tooltipoffsets[0] * 2) : x;
            y = (y + tiph > dTop + wHght) ? dTop + wHght - tiph - 10 : y;
            // last ditch attempt to keep the graphs 'on page'
            x = Math.max(x, 0);
            y = Math.max(y, 0);
            $tooltip.css({left: x, top: y});
        },
The PIT
Posts: 260
Joined: Thu 10 Dec 2009 6:15 pm
Weather Station: Davis VP2 Wireless
Operating System: Windows 7 32 bit
Location: England
Contact:

Re: Steel Gauges on a mobile

Post by The PIT »

Thanks Mark for a web developer that may mean something but to me a mere mortal it doesn't give me a sense on how to move the graphs. It's like having a map in a desert i.e no reference point so you don't know where you are.

On amobile device the graph needs to popup on the right hand side for the left hand dial and the reverse for the right hand the issue is the same for ipad. Been stuck in iframe doesn't help either I suppose.
Based in Sunny Old Sheffield South Yorkshire England

www.sheffieldweather.co.uk
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Steel Gauges on a mobile

Post by mcrossley »

Look towards the end of gauges.js (search for "positiontooltip: function", you will find the corresponding bit of code there, replace it (or at the least the last few lines) with what I pasted above.
The PIT
Posts: 260
Joined: Thu 10 Dec 2009 6:15 pm
Weather Station: Davis VP2 Wireless
Operating System: Windows 7 32 bit
Location: England
Contact:

Re: Steel Gauges on a mobile

Post by The PIT »

Haha it works thank you.

Next bit anyway to get rid of the black diamond and the question mark? between for example 12.2?C I presume the ? should be a space.

Also how do upgrade to later versions?
Based in Sunny Old Sheffield South Yorkshire England

www.sheffieldweather.co.uk
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Steel Gauges on a mobile

Post by mcrossley »

The PIT wrote:Haha it works thank you.

Next bit anyway to get rid of the black diamond and the question mark? between for example 12.2?C I presume the ? should be a space.
That is caused by you not saving the file in utf-8 format when you edited it. You need to get a copy the original file, make your changes with a decent editor (Notepad++ is a good general purpose editor) which should detect it is utf-8 anyway. Then make sure you save back in the same format.
The PIT wrote:Also how do upgrade to later versions?
Get a copy of the latest version and replace the files that have changed? The readme tells you what files change on each release.
The PIT
Posts: 260
Joined: Thu 10 Dec 2009 6:15 pm
Weather Station: Davis VP2 Wireless
Operating System: Windows 7 32 bit
Location: England
Contact:

Re: Steel Gauges on a mobile

Post by The PIT »

Just re saved the file in utf 8 format and the symbols have gone. :)
Based in Sunny Old Sheffield South Yorkshire England

www.sheffieldweather.co.uk
The PIT
Posts: 260
Joined: Thu 10 Dec 2009 6:15 pm
Weather Station: Davis VP2 Wireless
Operating System: Windows 7 32 bit
Location: England
Contact:

Re: Steel Gauges on a mobile

Post by The PIT »

I guess since I'm so far behind I'll have to replace all the files and then edit gauges file to match what I've already got.
Based in Sunny Old Sheffield South Yorkshire England

www.sheffieldweather.co.uk
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Steel Gauges on a mobile

Post by mcrossley »

Do it on a parallel page until you have it working and are happy. Then cut over.
Post Reply