cloudy cloudy

Author Topic: Gauges position  (Read 1834 times)

0 Members and 1 Guest are viewing this topic.

Offline Yendor

  • Posts: 88
  • La Crosse 2310
  • Wanaka NZ
  • OS/Browser:
  • Win NT 10.0
  • Chrome 58.0.3029.110
    • Wanaka Weather
Gauges position
« on: May 26, 2017, 02:23:47 AM »
I am sure I have seen something about this in the forum but I cannot find it. In my quest to get the mouseover graphs to work I have somehow altered the positioning of the gauges on my site. Rather that 1 row in the header I now have 2 and in the 2nd menu selection for steel series I have no graphs present. Does anyone have an idea where I can look to change this? www.wanakaweather.co.nz/weather28
« Last Edit: May 26, 2017, 02:25:18 AM by Yendor »

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,421
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.12.5
  • Chrome 58.0.3029.110
    • My PWS at Leuven Belgium Europe
Re: Gauges position
« Reply #1 on: May 26, 2017, 06:42:28 AM »
I am sure I have seen something about this in the forum but I cannot find it. In my quest to get the mouseover graphs to work I have somehow altered the positioning of the gauges on my site. Rather that 1 row in the header I now have 2 and in the 2nd menu selection for steel series I have no graphs present. Does anyone have an idea where I can look to change this? www.wanakaweather.co.nz/weather28
The header gauges:
The script in the header => http://www.wanakaweather.co.nz/weather28/gauges/gaugeFrame.php?sce=view
You set the number of gauges in a row to 3 (line 5) and  selected 6 gauges to be displayed (line 21-31)
So the script wil display two rows, both with 3 gauges.
Code: [Select]
#-------------------- S e t t i n g s ----------------------------------
#
$credits        = false;        # false or true
$gauges_row     = 3;            # 3, 4 or 5 gauges / row.  Or 6 gauges in 1 row.
$gaugSize       = 121;          # 121 151 and 171 are often used sizes.
$disp_lcd_line  = true;         # true or false if no display of the line with led / forecast /counter
#                               # following lcd settings are ignored if disp_lcd_line is set to false
$disp_lcd_place = 'bottom';     # 'bottom' = below gauges or 'top' = above gauges.
$disp_lcd_led   = true;         # true or false if no display of the LED
$disp_lcd_fct   = true;         # true or false if no display of the forecast line
$disp_lcd_count = true;         # true or false if no display of the counter.
#
$lcd_fct_width  = 500;          # width of the LCD with forcast text, if displayed
$lcd_height     = 15;           #
$lcd_line_loc   = 'center';     # 'center'  'left'  'right'
#
#
# ----------------------------  which gauges should be displayed
$disp_temp      = true;         # true or false if not displayed
$disp_dew       = false; 
$disp_hum       = true;   
$disp_baro      = true;
$disp_windspeed = true;
$disp_direction = true;
$disp_rain      = false;
$disp_rainrate  = false;
$disp_UV        = false;        # automatically set to false if no sensor is available
$disp_solar     = false;        # automatically set to false if no sensor is available
#
$disp_clock     = true;         # only for display in iframe
The gauges in the header should NOT be set to display the pop-up graphs as they are run in an iFrame. The grpahs would then partly disappear outside the iframe.

Pop-up graphs:
http://www.wanakaweather.co.nz/weather28/index.php?p=gaugePage&lang=en#data-area
They are perfectly displayed in Chrome, FF and Safari.  Nothing changed since long for those scripts.

Wim
« Last Edit: May 26, 2017, 06:45:33 AM by wvdkuil »
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline Yendor

  • Posts: 88
  • La Crosse 2310
  • Wanaka NZ
  • OS/Browser:
  • Win NT 10.0
  • Chrome 58.0.3029.110
    • Wanaka Weather
Re: Gauges position
« Reply #2 on: May 27, 2017, 12:36:56 AM »
Thank you. I just could not find where to look. What I was referring to regarding the graphs was my attempt to add the windrose as per       
 http://www.wanakaweather.co.nz/weather28/index.php?p=900-20&lang=en#data-area   This has been my attempt so far and i was wondering if I can get the graphs displaying here? This is the page I would prefer to use.

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,421
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.12.5
  • Chrome 58.0.3029.110
    • My PWS at Leuven Belgium Europe
Re: Gauges position
« Reply #3 on: May 27, 2017, 09:30:12 AM »
Thank you. I just could not find where to look. What I was referring to regarding the graphs was my attempt to add the windrose as per       
 http://www.wanakaweather.co.nz/weather28/index.php?p=900-20&lang=en#data-area   This has been my attempt so far and i was wondering if I can get the graphs displaying here? This is the page I would prefer to use.
See attached jpg for the errors.  The links for 1 CSS and all wxgraphs are invalid => 404 error.
You can inspect/ find these errors in f.i. Chrome:
RightClick on a page => Select "Inspect" from the pop-up menu => Click tab "Console"
My system uses the  Dutch language, but you will find the "English" words.

This is the source of the page you are testing:
http://www.wanakaweather.co.nz/weather28/gauge.php?sce=view

You are using a complete page including html-head and so on inside another page with html head. That will certainly lead to more problems.

Please follow this procedure when adding new complex scripts:
Step 1: Test the stand-alone page as is.
Do not copy the html into a  template "new-page" but run it as is.
Check for all errors using "inspect".
If you run into a problem, post the link to the stand-alone page on the forum also.

Step 2: NEVER include a complete html page including all overhead inside a template php page.  If the stand-alone page runs without any errors,  copy the "new-page" for the template and use the stand-alone page in an iFrame.

That way you can use ANY stand-alone page without having to  adapt all links to CSS-files, javascripts and so on. Makes updating to new versions of those scripts a lot easier.

The missing graphs: check line 20 in the gauges.js you are using:
http://www.wanakaweather.co.nz/weather28/scripts/gauges.js
Code: [Select]
            imgPathURL        : '../../wxgraphs/',      //*** Change this to the relative path for your 'Trend' graph images
You are currently executing the html from within the weather28/ folder.
The imgpathURL starts with 2 times "../" which means two steps towards the root folder.
The php will output a link http://www.wanakaweather.co.nz/wxgraphs/rain_24hr.php
and the webserver will load from that "wxgraphs" folder.
There is no such root/wxgrpahs/ folder, so the resulting link => 404 error

Solution: If you are st*p*d enough to mix/match all kind of scripts inside one template-folder, you could use the weather28/wxgrpahs/ folder. Change the line to
Code: [Select]
            imgPathURL        : './wxgraphs/',      //*** Change this to the relative path for your 'Trend' graph images
The result will be OK:
http://www.wanakaweather.co.nz/weather28/wxgraphs/rain_24hr.php

===> Gauges
The "Steelseries-weather-gauges" are there in multiple versions, at least 4 at last count. Keep them as separate as possible so at least use different root folders.
You put the  original "Mark Crossley - version" inside the weather28 folders. But the scripts can have the same names and or use the same variables, such as $url.

The "leuven" version is based on an old "Mark Crossley - version"  =D>  , but is different enough to keep the scripts/css/js fully  ](*,)  separated.

Succes,
Wim
« Last Edit: May 27, 2017, 09:42:40 AM by wvdkuil »
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline Yendor

  • Posts: 88
  • La Crosse 2310
  • Wanaka NZ
  • OS/Browser:
  • Win NT 10.0
  • Chrome 58.0.3029.110
    • Wanaka Weather
Re: Gauges position
« Reply #4 on: May 27, 2017, 09:13:14 PM »
Thank you for your help. My ignorance has been a hindrance to me but I am slowly gaining some measure of understanding. Your unwavering dedication to providing a great service is appreciated. I will stick with template files and not mix them if possible. I was trying to add the windrose to display and that appears to be beyond me so I am happy with what I have got now.

 

cumulus