cloudy cloudy

Author Topic: Reducing the size of the dials?  (Read 1957 times)

0 Members and 1 Guest are viewing this topic.

Offline G4MHJ

  • Erith Weather
  • Posts: 291
  • Davis VP2 + Solar/UV
  • Erith, Kent, UK
  • OS/Browser:
  • Mac OS X 10.13.5
  • Safari 11.1.1
    • G4MHJ-Home
Reducing the size of the dials?
« on: July 28, 2018, 07:46:40 PM »
Can the dials be reduced in size?  Is this possible without major changes.
I have had the dials working on my old website
http://bobhewitt.co.uk/wxdial.htm

I have been working on a Saratoga version and the dials need to be smaller.
http://bobhewitt.co.uk/pictures/WeatherDisplay/wxssgauges.php#

In gauges.js I noticed this syntax but wasn't sure if I risked changing anything here?


            // Are we running on a phone device (or really low res screen)?
            if ($(window).width() < 480) {
                // Change the gauge scaling
                config.gaugeScaling = config.gaugeMobileScaling;
                // Switch off graphs?
                config.showPopupGraphs = config.mobileShowGraphs;
            } else {
                config.gaugeScaling = 1;

Offline Weather Display

  • Posts: 85,438
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 67.0.3396.99
    • Weather Display
Re: Reducing the size of the dials?
« Reply #1 on: July 28, 2018, 08:36:16 PM »
it can be done
eg meteotemplate does it
see the gauges right hand side:
https://www.weather-display.org/template/indexDesktop.php

Offline mcrossley

  • Posts: 644
  • Wilmslow, Cheshire, UK
    • none
  • OS/Browser:
  • Android 8.1.0
  • Chrome 67.0.3396.87
    • WilmslowAstro Weather
Re: Reducing the size of the dials?
« Reply #2 on: July 29, 2018, 07:30:35 AM »
The size is set in the CSS file, I'm on my phone at mo so cannot look it up, but if you can't find it then shout and I'll check on the 'puter later.

From memory there are three sample sizes in the CSS, but you can just edit the default size.
Mark

Offline mcrossley

  • Posts: 644
  • Wilmslow, Cheshire, UK
    • none
  • OS/Browser:
  • Win NT 10.0
  • Chrome 68.0.3440.75
    • WilmslowAstro Weather
Re: Reducing the size of the dials?
« Reply #3 on: July 30, 2018, 01:49:33 PM »
So, in the gauges CSS file you have...
Code: [Select]
.gaugeSizeSml {
  width: 181px;
  height: 181px;
}
.gaugeSizeStd {
  width: 221px;
  height: 221px;
}
.gaugeSizeLrg {
  width: 261px;
  height: 261px;
}

You can either change the gauges HTML to use "gaugeSizeSm" or edit the gaugeSizeStd class to whatever you want.
Mark

Offline G4MHJ

  • Erith Weather
  • Posts: 291
  • Davis VP2 + Solar/UV
  • Erith, Kent, UK
  • OS/Browser:
  • Mac OS X 10.13.5
  • Safari 11.1.1
    • G4MHJ-Home
Re: Reducing the size of the dials?
« Reply #4 on: August 01, 2018, 07:54:29 PM »
mcrossley:
Sorry for delay in replying.
When I changed the size for all the dials in the html file from gaugeSizeStd to gaugeSizeSm the dials became bigger so I was a little confused.
I will try changing the css file next.


Offline G4MHJ

  • Erith Weather
  • Posts: 291
  • Davis VP2 + Solar/UV
  • Erith, Kent, UK
  • OS/Browser:
  • Mac OS X 10.13.5
  • Safari 11.1.1
    • G4MHJ-Home
Re: Reducing the size of the dials?
« Reply #5 on: August 01, 2018, 07:58:33 PM »
it can be done
eg meteotemplate does it
see the gauges right hand side:
https://www.weather-display.org/template/indexDesktop.php
Looks nice and might be a future project.  I see that you don't show UV dials - is that because it cannot?

Offline Weather Display

  • Posts: 85,438
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 67.0.3396.99
    • Weather Display
Re: Reducing the size of the dials?
« Reply #6 on: August 01, 2018, 09:20:51 PM »
uv and solar are available to be displayed if you want with MT

 

cumulus