cloudy

Author Topic: WU Graphs 1.8.0  (Read 68746 times)

0 Members and 1 Guest are viewing this topic.

Offline bhogsett

  • Posts: 182
  • Cleveland, Ohio, USA
  • OS/Browser:
  • Mac OS X 10.7
  • Firefox 11.0
    • BoatHouse Weather
Re: WU Graphs 1.8.0
« Reply #645 on: February 14, 2012, 04:21:22 PM »
Thanks Radek, I will try your suggestions again.  I tried them and found that I had a bug in my code.  My pages are generated using classes and factories and I had missed the code needed to pull in the css file.  So I would make your changes in the file and nothing would happen because the page did not have a reference to form.css.  Fixed and looks fine.

I have added an additional date format so that dates appear as "full month name day without leading zero, full year" (e.g., February 14, 2012).  The change was pretty simple and is in WUG-inc.day.php around line 140 or so.  The change is

Code: [Select]
$monthName = date("F", mktime(0, 0, 0, ($month)));   //WFH  2-14-12
$dayOneDigit = ltrim($day, '0'); //WFH  2-14-12
// Day date text formating
// 0 = d.m.yyyy; 1 = m.d.yyyy; 2 = m/d/yyyy; 3 = d.m.yy; 4 = m.d.yy; 5 = m/d/yy; WFH  February 14, 2012 6 = $monthname d, yyyy
$dayDateText = array(
$day .'.'. $month .'.'. $year,
$month .'.'. $day .'.'. $year,
$month .'/'. $day .'/'. $year,
$day .'.'. $month .'.'. substr($year, -2),
$month .'.'. $day .'.'. substr($year, -2),
$month .'/'. $day .'/'. substr($year, -2),
$monthName .' '. $dayOneDigit .', '. $year   //WFH  2-14-12
);


The changes are marked with "//WFH 2-14-12"
WFH is my initials and 2-14-12 is the date.  Oh, Happy Valentine's Day!!!

Looking at the code, I think a better way would be to not create new variables, but just make the changes in the array itself.  Oh well!

The option for the new date format is 6 in the array so that option needs to be set in the configurator and in the settings file.  When I was testing, I made the change but did not manually change the settings for $ddFormat so the change did not appear!

I also prefer other strings fore the time periods and changed the following in the WUG-lang-en.php:

$TperYear = ' for '; // with spaces at start and end text  WFH was for year
$TperDay = ' for '; // with spaces at start and end text  WFH was per day
$TperMonth = ' for '; // with spaces at start and end text  WFH  was per month
$Tplast = 'last';  //WFH 2-14-12 was per last

I think the date format might be of interest to others.  The strings are more a personal preference, and i have not even thought about translations. 

Addition 2-14-12 or February 14, 2012   :D

The tooltip (based on $ttDateText array) for month and year (contained in the WUG-inc-month/year.php files) needs to be changed to add the formatting for the new date format

Code: [Select]
'%B %e, %Y' 

I do not understand why HighCharts uses some non-standard date formatting codes, but it does!

Bill
« Last Edit: February 14, 2012, 09:43:04 PM by bhogsett »

Offline Meeterea

  • Posts: 5
  • Europe, Netherlands, Culemborg
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • MS IE 9.0
    • amvih
Re: WU Graphs 1.8.0
« Reply #646 on: February 17, 2012, 06:59:35 PM »
Hello,

Does anyone know what to do with the following problem.
See figures.
In Internet Explorer 9 64-bit the numbers behind the comma are not rounded to 1 decimal, see red underlined.
In Internet Explorer 9 32-bit this is good, green underlined.

What goes wrong here?

Thanks for any help!

gr.
Arie
Weather slogan: The Problem with the Weatherforecast is that you can't be sure if it's always wrong.


Offline RAD-X

  • Posts: 253
  • Hovezi, Czech Republic
  • OS/Browser:
  • Win Vista/Srvr 2008
  • Firefox 10.0.1
    • Pocasi Hovezi
Re: WU Graphs 1.8.0
« Reply #647 on: February 18, 2012, 03:03:20 PM »
Hello,

Does anyone know what to do with the following problem.
See figures.
In Internet Explorer 9 64-bit the numbers behind the comma are not rounded to 1 decimal, see red underlined.
In Internet Explorer 9 32-bit this is good, green underlined.

What goes wrong here?

Thanks for any help!

gr.
Arie
It's look like a problem with Highcharts library. You can try to use latest version of highcharts (added in attachment). Just unpack and overwrite file located in wxwugraphs/js/ directory.
However i don't see any fix about this problem on Highcharts changelog: http://www.highcharts.com/documentation/changelog
« Last Edit: February 18, 2012, 03:07:44 PM by RAD-X »
Radek
Weather Hovezi | WU graphs | DONATE
Yes. My English is bad. But the effort is appreciated. :happy8:

Offline RAD-X

  • Posts: 253
  • Hovezi, Czech Republic
  • OS/Browser:
  • Win Vista/Srvr 2008
  • Firefox 10.0.1
    • Pocasi Hovezi
Re: WU Graphs 1.8.0
« Reply #648 on: February 18, 2012, 03:05:41 PM »
Thanks Radek, I will try your suggestions again.  I tried them and found that I had a bug in my code.  My pages are generated using classes and factories and I had missed the code needed to pull in the css file.  So I would make your changes in the file and nothing would happen because the page did not have a reference to form.css.  Fixed and looks fine.

I have added an additional date format so that dates appear as "full month name day without leading zero, full year" (e.g., February 14, 2012).  The change was pretty simple and is in WUG-inc.day.php around line 140 or so.  The change is

I think the date format might be of interest to others.  The strings are more a personal preference, and i have not even thought about translations. 

The tooltip (based on $ttDateText array) for month and year (contained in the WUG-inc-month/year.php files) needs to be changed to add the formatting for the new date format
Thanks Bill,
I add your suggestions to next version of WU-Graphs.
Radek
Weather Hovezi | WU graphs | DONATE
Yes. My English is bad. But the effort is appreciated. :happy8:

Offline bhogsett

  • Posts: 182
  • Cleveland, Ohio, USA
  • OS/Browser:
  • Mac OS X 10.7
  • Firefox 11.0
    • BoatHouse Weather
Re: WU Graphs 1.8.0
« Reply #649 on: February 18, 2012, 04:25:13 PM »
I have had a consistent problem with Configurator throwing an error when it writes Settings.php.

I have looked at the demo on Radek's pages and it obviously works. 

The error is the insertion of \ (two actually) into the definition of $CustomBgTheme.

I get this line in settings.php:

Code: [Select]
$CustomBgTheme = \'transparent\';
The leading \ causes a php error.  Others have reported the same problem.

I have found a workaround, which is to insert double quotes into the Configurator where it defines $CustomBgTheme so it reads:

Code: [Select]
$CustomBgTheme = "'.$_POST['CustomBgTheme'].'";  // WFH 2-16-12  added surrounding double quotes so no error in settings.php after save.

This stops the error, but caues other problems.

$CustomBgTheme can contain one of three values--false, transparent or true.

But false and true should not be quoted since they are Boolean values.  If they are quoted the tests for them in WUG-Settings will not fully work.  It will work for transparent and false (since false is the default and not actually tested), but not for true.  The workaround (and it is really not what should be done, but it works!) is to put quotes around true whenever there is a test for $CustomBgTheme being true. 

I see two tests in WUG-Settings at around 377 and 396.  The revised line reads:

Code: [Select]
$pgBGC = $CustomBgTheme === 'true' ? $colorpickerBgVal : $pgBGC;  //WFH  made true a string 2-16-12

With this $pgBGC is properly set.

I looked for sometime to understand why the bug existed on my--and other configurations--but could see nothing to cause it.  My fix is not very satisfactory to me.  Boolean values should be used rather than strings for true.   Hopefully, Radek can figure out why some people get errors and others do not--actually why sometimes the "/" is being written.  I tested with php 5.2.17 and 5.3.6.

Bill

Offline Meeterea

  • Posts: 5
  • Europe, Netherlands, Culemborg
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • MS IE 9.0
    • amvih
Re: WU Graphs 1.8.0
« Reply #650 on: February 19, 2012, 02:25:41 PM »
It's look like a problem with Highcharts library. You can try to use latest version of highcharts (added in attachment). Just unpack and overwrite file located in wxwugraphs/js/ directory.
However i don't see any fix about this problem on Highcharts changelog: http://www.highcharts.com/documentation/changelog

Thanks for your reply.
But no this is not the solution, i made also a post in the highcharts forum, I'll wait and see!

gr. Arie

p.s. I can unfortunately not unpack your zip file this is corrupted.
I have now as alternative downloaded it from the high chart forum.
Weather slogan: The Problem with the Weatherforecast is that you can't be sure if it's always wrong.


Offline Iceage

  • Posts: 106
  • North Wales, United Kingdom
  • OS/Browser:
  • Mac OS X 10.7.3
  • Safari 5.1.3
    • The Bay Weather - Live Weather, North Wales, UK
Re: WU Graphs 1.8.0
« Reply #651 on: February 29, 2012, 08:32:57 PM »
Hi All

I have uploaded WUGraphs and configured successfully after reading the tips in this post, please see http://www.thebayweather.com/wugraphs.php. Thanks to all contributors. This all works fine, until I come to embed in my pages and this is where I come unstuck. The page loads and I have an iframe that calls src="www.thebayweather.com/wugraphs.php" or src="wugraphs.php" unfortunately there is no data displayed and I have adjusted the table/iframe display settings. My other iframe pages work ok. What am I doing wrong ? Any help very much appreciated.

Page in question is at http://www.thebayweather.com/historicalgraphs.html

Code: [Select]
<table width="99%" >
<tr>
<td align="center">
<table width="897" height="917"
<iframe src="http://www.thebayweather.com/wugraphs.php" width="897" height="917" frameborder="0" scrolling=off >
</iframe>
</table>

Kindest regards

Andy
« Last Edit: February 29, 2012, 08:35:32 PM by Iceage »

              Live UK, North Wales and Europe weather, lightning and storm tracking

Offline RAD-X

  • Posts: 253
  • Hovezi, Czech Republic
  • OS/Browser:
  • Win Vista/Srvr 2008
  • Firefox 10.0.2
    • Pocasi Hovezi
Re: WU Graphs 1.8.0
« Reply #652 on: March 03, 2012, 02:57:14 AM »
unfortunately there is no data displayed and I have adjusted the table/iframe display settings. My other iframe pages work ok. What am I doing wrong ? Any help very much appreciated.

Page in question is at http://www.thebayweather.com/historicalgraphs.html

Code: [Select]
<table width="99%" >
<tr>
<td align="center">
<table width="897" height="917"
<iframe src="http://www.thebayweather.com/wugraphs.php" width="897" height="917" frameborder="0" scrolling=off >
</iframe>
</table>

Hi Andy,
you have a unclosed tag "table".
Your code:
Quote
<table width="897" height="917" - Missing a Angle bracket
<iframe src="http://www.thebayweather.com/wugraphs.php" width="897" height="917" frameborder="0" scrolling=off >
</iframe>
Right code is:
Quote
...
<table width="897" height="917">
...

For future a better glasses can fix this problem.  :wink:
« Last Edit: March 03, 2012, 03:03:01 AM by RAD-X »
Radek
Weather Hovezi | WU graphs | DONATE
Yes. My English is bad. But the effort is appreciated. :happy8:

Offline Meeterea

  • Posts: 5
  • Europe, Netherlands, Culemborg
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • MS IE 9.0
    • amvih
Re: WU Graphs 1.8.0
« Reply #653 on: March 05, 2012, 06:05:02 PM »
Thanks for your reply.
But no this is not the solution, i made also a post in the highcharts forum, I'll wait and see!

gr. Arie

p.s. I can unfortunately not unpack your zip file this is corrupted.
I have now as alternative downloaded it from the high chart forum.

From the highcharts forum came an solution.
I must have a rounding function in the graphd7a.php file.
So I change this:
Code: [Select]
yAxis: {
               title: {
               enabled: true,
                  text: '<?php echo $PrecTran.' ( '.$TsizeUnits.' )'?>'
               },
            min: 0,
            labels: {
              formatter: function() {
                return this.value +'';

in this:
Code: [Select]
yAxis: {
               title: {
               enabled: true,
                  text: '<?php echo $PrecTran.' ( '.$TsizeUnits.' )'?>'
               },
            min: 0,
            labels: {
              formatter: function() {
                return this.value.toFixed(1) +'';

Everything will be rounded to 1 decimal with this function (return this.value.toFixed(1)).

gr.
Arie
Weather slogan: The Problem with the Weatherforecast is that you can't be sure if it's always wrong.


Offline Iceage

  • Posts: 106
  • North Wales, United Kingdom
  • OS/Browser:
  • Mac OS X 10.7.3
  • Safari 5.1.3
    • The Bay Weather - Live Weather, North Wales, UK
Re: WU Graphs 1.8.0
« Reply #654 on: March 05, 2012, 08:02:30 PM »
Hi Radek

Many thanks for your brilliant observation.

Quote
Right code is:
...
<table width="897" height="917">
...

For future a better glasses can fix this problem. 

I have now fixed the problem and adjusted my settings so the page looks right. Really appreciate your help. I am off to have new glasses later in the week!  :glasses7:

Please see http://www.thebayweather.com/historicalgraphs.html - Will be available later on my site after a bit more quality control......

One more quick question relating to a MySql query. Can anyone help with this one ? http://www.weather-watch.com/smf/index.php/topic,54960.0.html

As ever, thanks everyone for your help.

Andy
« Last Edit: March 06, 2012, 06:59:03 PM by Iceage »

              Live UK, North Wales and Europe weather, lightning and storm tracking

Offline RAD-X

  • Posts: 253
  • Hovezi, Czech Republic
  • OS/Browser:
  • Win Vista/Srvr 2008
  • Firefox 10.0.2
    • Pocasi Hovezi
Re: WU Graphs 1.8.0
« Reply #655 on: March 07, 2012, 02:29:15 PM »
From the highcharts forum came an solution.
I must have a rounding function in the graphd7a.php file.
Pitty... better would be fixing directly in highcharts code. Said Torstein Hønsi something about it? Because this is bug and must be fixed!!!! :)
Radek
Weather Hovezi | WU graphs | DONATE
Yes. My English is bad. But the effort is appreciated. :happy8:

Offline RAD-X

  • Posts: 253
  • Hovezi, Czech Republic
  • OS/Browser:
  • Win Vista/Srvr 2008
  • Firefox 10.0.2
    • Pocasi Hovezi
Re: WU Graphs 1.8.0
« Reply #656 on: March 07, 2012, 02:33:10 PM »
Hi Radek

Many thanks for your brilliant observation.

I have now fixed the problem and adjusted my settings so the page looks right. Really appreciate your help. I am off to have new glasses later in the week!  :glasses7:

Please see http://www.thebayweather.com/historicalgraphs.html - Will be available later on my site after a bit more quality control......

One more quick question relating to a MySql query. Can anyone help with this one ? http://www.weather-watch.com/smf/index.php/topic,54960.0.html

As ever, thanks everyone for your help.

Andy
Hi Andy,
glad to hear it. :)
And I can help you with your MySQL problem... probably :)
Radek
Weather Hovezi | WU graphs | DONATE
Yes. My English is bad. But the effort is appreciated. :happy8:

Offline AenG

  • Posts: 85
  • Boskamp (Netherlands)
  • OS/Browser:
  • Win XP
  • MS IE 7.0
    • My homepage
Re: WU Graphs 1.8.0
« Reply #657 on: March 29, 2012, 06:36:14 AM »
I have the following problem:

When i press the tab "temperature" i can switch to graphic  "day",  "month" and  "year".
But when i press tab "rain" and then "day", the tab switch to "temperature"

I have this problem with all tabs.

I see this problem on all websites who use WU-Graphs.
Is this normal?

« Last Edit: March 29, 2012, 06:58:47 AM by AenG »
regards,

Geert

Offline RAD-X

  • Posts: 253
  • Hovezi, Czech Republic
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 11.0
    • Pocasi Hovezi
Re: WU Graphs 1.8.0
« Reply #658 on: April 01, 2012, 10:20:42 AM »
I have the following problem:

When i press the tab "temperature" i can switch to graphic  "day",  "month" and  "year".
But when i press tab "rain" and then "day", the tab switch to "temperature"

I have this problem with all tabs.

I see this problem on all websites who use WU-Graphs.
Is this normal?
Yes, this is normal. :)
Each the time tab have memory for selected measured unit (stored in cookies). Default selected tab (without memory) is first tab (Temperature).
Proof:
1. click on Day tab and select Rain
2. click on Month tab and select Wind speed
3. now click to Day tab and is selected Rain tab automatically (restored from memory)

BTW: In WU Graphs Configurator you can set Cookies expiration value (autoreset for stored tab position). Default is 0,5 day (12 hours).
« Last Edit: April 01, 2012, 10:26:37 AM by RAD-X »
Radek
Weather Hovezi | WU graphs | DONATE
Yes. My English is bad. But the effort is appreciated. :happy8:

Offline AenG

  • Posts: 85
  • Boskamp (Netherlands)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • MS IE 9.0
    • My homepage
Re: WU Graphs 1.8.0
« Reply #659 on: April 02, 2012, 09:14:18 AM »
Yes, this is normal. :)
Each the time tab have memory for selected measured unit (stored in cookies). Default selected tab (without memory) is first tab (Temperature).
Proof:
1. click on Day tab and select Rain
2. click on Month tab and select Wind speed
3. now click to Day tab and is selected Rain tab automatically (restored from memory)

BTW: In WU Graphs Configurator you can set Cookies expiration value (autoreset for stored tab position). Default is 0,5 day (12 hours).

I want this:

press temperatue-    then Hourly or Monthly or Yearly
press Humidity   -  then Hourly or Monthly or Yearly
press Barometer - then Hourly or Monthly or Yearly
press wind speed - then Hourly or Monthly or Yearly

Is this possible? (disable cookies?)
regards,

Geert

 

cumulus