Author Topic: New version of wxgraphs package using JPGraph for Weather Display  (Read 1467 times)

0 Members and 1 Guest are viewing this topic.

Offline Cienega32

  • Forecaster
  • *****
  • Posts: 2609
    • East Mesa Weather
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #25 on: September 23, 2023, 05:35:50 AM »
Updated my page to latest version wxgraghs and it now works as they did not before
https://www.hc-iom.co.uk/graphs/wxgraphs.html
But in safari on the iPad I do see the &amp in the Hilo graph I have not checked edge yet
Php 8.0.30 and jpgraph 4.4.1

&amp shows for me w/ FFox on your link. There goes the "it must be a UK thing" theory... :lol:

Pat ~ Davis VP2 6153-Weatherlink-Weather Display-StartWatch-VirtualVP-Win7 Pro-64bit
www.LasCruces-Weather.com   www.EastMesaWeather.com

Offline broadstairs

  • Forecaster
  • *****
  • Posts: 749
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #26 on: September 23, 2023, 06:06:25 AM »
Are you really saying that my graphs at https://www.stella-maris.org.uk/wxgraphs.phtml#31day show the & value on screen? Because this is actually sent as a graphics image and so should display correctly.

I cannot help but think this is a JPGraph issue. I wonder how many people really have V4.4.2 on their server? The 4.4.2 readme shows

Quote
Requirements:
-------------
Miminum:
* PHP 5.1.0 or higher
* GD 2.0.28 or higher
Note: Earlier versions might work but is unsupported.

Recommended:
* >= PHP 5.2.0
* PHP Builtin GD library

I think it is worth checking that servers meet this requirement especially the GD one as that builds the image. I think I'm going to remove the max min comment from the header line completely as I don't want to have issues. If anyone wants to edit the file and have it working for them that's fine, but my data online stays as it is since for me the display is correct.

Stuart

PS I'm still looking at the legend issue but it may be a day or more before I can get round to it.
Ecowitt GW1003 with ultrasonic wind gauge, lightning sensor and PM2.5 sensor with Personal Weather Tablet as a console.

Offline Vasco

  • Senior Contributor
  • ****
  • Posts: 186
    • PWS
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #27 on: September 23, 2023, 06:17:27 AM »
Updated my page to latest version wxgraghs and it now works as they did not before
https://www.hc-iom.co.uk/graphs/wxgraphs.html
But in safari on the iPad I do see the &amp in the Hilo graph I have not checked edge yet
Php 8.0.30 and jpgraph 4.4.1

&amp shows for me w/ FFox on your link. There goes the "it must be a UK thing" theory... :lol:

And on Edge. . .
Oregon Scientific WMR200 + Weather Display in Windows 10

Offline Vasco

  • Senior Contributor
  • ****
  • Posts: 186
    • PWS
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #28 on: September 23, 2023, 06:19:11 AM »
Are you really saying that my graphs at https://www.stella-maris.org.uk/wxgraphs.phtml#31day show the & value on screen?

I think he was replying to @hcorrin. . .
Oregon Scientific WMR200 + Weather Display in Windows 10

Offline broadstairs

  • Forecaster
  • *****
  • Posts: 749
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #29 on: September 23, 2023, 06:33:26 AM »
I just downloaded the png file from hcorrin's site and it displays using gwenview with the & value in the header which means this has to be an issue creating the png file on the server. So I suspect that either the JPGraph files are wrong or there is something missing in the PHP installation on the server. My server shows GD support and has version 2.3.3 for both headers and library. My PHP version is 8.2.8. I have checked my jpg.config file in JPGraph 4.4.2 and it has no modification by me it is as delivered in the package.

Stuart
Ecowitt GW1003 with ultrasonic wind gauge, lightning sensor and PM2.5 sensor with Personal Weather Tablet as a console.

Offline hcorrin

  • Senior Member
  • **
  • Posts: 96
    • Ballaugh Weather
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #30 on: September 23, 2023, 07:02:02 AM »
Ok Stuart your link works ok on my iPad
So this evening will put 4.4.2 in place of 4.4.1 and see what happens
Gd is version 2.1.0 and enabled on my hosts shared server

Offline broadstairs

  • Forecaster
  • *****
  • Posts: 749
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #31 on: September 23, 2023, 07:16:48 AM »
Ok Stuart your link works ok on my iPad
So this evening will put 4.4.2 in place of 4.4.1 and see what happens
Gd is version 2.1.0 and enabled on my hosts shared server

What's your PHP version on the server? I just tested with JPGraph 4.4.1 on my local server and i works OK for me showing only the & character.

My hosting site allows me to select the PHP version and whether or not I use the GD libraries along with a whole list of other options.

Stuart
« Last Edit: September 23, 2023, 07:20:48 AM by broadstairs »
Ecowitt GW1003 with ultrasonic wind gauge, lightning sensor and PM2.5 sensor with Personal Weather Tablet as a console.

Offline Vasco

  • Senior Contributor
  • ****
  • Posts: 186
    • PWS
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #32 on: September 23, 2023, 07:26:03 AM »
Oregon Scientific WMR200 + Weather Display in Windows 10

Offline Cienega32

  • Forecaster
  • *****
  • Posts: 2609
    • East Mesa Weather
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #33 on: September 23, 2023, 07:28:57 AM »
OK - I just uploaded all the stuff to my website. I changed the temp hi-lo back to the original &amp...
It shows -   &  - as it should.

Could the difference be in the server OS? I have linux on 1And1 host but WIN7 on my local xampp localhost.

Different OS translating on the argument symbol of '&' in Line 143?

Pat ~ Davis VP2 6153-Weatherlink-Weather Display-StartWatch-VirtualVP-Win7 Pro-64bit
www.LasCruces-Weather.com   www.EastMesaWeather.com

Offline broadstairs

  • Forecaster
  • *****
  • Posts: 749
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #34 on: September 23, 2023, 11:55:59 AM »
To get back to the Legend issue I think I now understand what is happening but cannot find a fix for it yet. If you enlarge a view of the individual graph considerably you can see there is a line drawn around the bar and this is the colour used by the legend code, NOT the colour of the filled bar. I've tried various options but so far not found the answer. This is a JPGraph Group Bar Plot which I think may be the issue. This is going to take some time to resolve.

Stuart

PS. Your not going to believe this but I have found a solution and it's because I've been spelling colour as colour ie. the CORRECT WAY however the code requires me to MISSPELL it as COLOR  :shock:  #-o  :roll: stupid wrong spelling, why oh why does everyone who codes think to use US spellings which in my view are plain wrong  :roll:  ](*,)

Anyway now I am getting somewhere I will have the code cleaned up and uploaded in a day or so
« Last Edit: September 23, 2023, 12:11:58 PM by broadstairs »
Ecowitt GW1003 with ultrasonic wind gauge, lightning sensor and PM2.5 sensor with Personal Weather Tablet as a console.

Offline Vasco

  • Senior Contributor
  • ****
  • Posts: 186
    • PWS
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #35 on: September 23, 2023, 01:46:26 PM »
PS. Your not going to believe this but I have found a solution and it's because I've been spelling colour as colour ie. the CORRECT WAY however the code requires me to MISSPELL it as COLOR

Oh, I believe, I really do. . .  :lol:

Oregon Scientific WMR200 + Weather Display in Windows 10

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 405
    • Gobles Weather Page
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #36 on: September 23, 2023, 01:58:19 PM »
Here is my webhost GD. Running 4.4.2 and PHP 8.2.1.

Quote
GD Support   enabled
GD Version   bundled (2.1.0 compatible)
FreeType Support   enabled
FreeType Linkage   with freetype
FreeType Version   2.10.4
GIF Read Support   enabled
GIF Create Support   enabled
JPEG Support   enabled
libJPEG Version   6b
PNG Support   enabled
libPNG Version   1.6.37
WBMP Support   enabled
XPM Support   enabled
libXpm Version   30411
XBM Support   enabled
WebP Support   enabled
BMP Support   enabled
TGA Read Support   enabled

Chuck

Offline Cienega32

  • Forecaster
  • *****
  • Posts: 2609
    • East Mesa Weather
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #37 on: September 23, 2023, 10:33:52 PM »
PS. Your not going to believe this but I have found a solution and it's because I've been spelling colour as colour ie. the CORRECT WAY however the code requires me to MISSPELL it as COLOR  :shock:  #-o  :roll: stupid wrong spelling, why oh why does everyone who codes think to use US spellings which in my view are plain wrong  :roll:  ](*,)

Thy spelling of the word may seem correct by thou but to us colonists, it just ain't no good to be used like that. Ya gotta talk in Murican. We invented English, ya know...
  :lol: :-P ;)

Pat ~ Davis VP2 6153-Weatherlink-Weather Display-StartWatch-VirtualVP-Win7 Pro-64bit
www.LasCruces-Weather.com   www.EastMesaWeather.com

Offline broadstairs

  • Forecaster
  • *****
  • Posts: 749
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #38 on: September 24, 2023, 05:08:53 AM »
With regard to the Legend issue, which started all this, I think there is either a restriction or a bug in JPGraph relating to the use of gradient fills in bar charts. If I use a plain colour fill then the legend seems to work correctly but not if I use the gradient fill. Now the only thing where there is a legend and gradient fill is the year_rain_inc_avg.php (Rain last 12 months) graph. So the fix at least for now is to use a solid fill but this leaves all the other bar charts with gradient fills. I'll try to find out from JPGraph whether this is a bug or restriction.

Now my personal preference is to have all bar charts the same which means removing the gradient fills and replacing with solid colour fills. This is easier that allowing people to select whether they want gradient fills or solid fills as that means not only changing all the bar charts but also extending the graphsconf.php to allow switching between the two remebering for now that gradient fill on the Rain Last 12 months then screws up the legend!

So I'd like to know what folks here think they would prefer 1) leave as is and just change Rain Last 12 months to solid fill or 2) change all bar graphs to solid fills? I do not intend to code for switching as it's too much work.

Stuart

You can see the solid fill graph at https://www.stella-maris.org.uk/graphsjp/year_rain_inc_avg.php
« Last Edit: September 24, 2023, 05:12:09 AM by broadstairs »
Ecowitt GW1003 with ultrasonic wind gauge, lightning sensor and PM2.5 sensor with Personal Weather Tablet as a console.

Offline Cienega32

  • Forecaster
  • *****
  • Posts: 2609
    • East Mesa Weather
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #39 on: September 24, 2023, 06:37:32 AM »
My opinion is that the gradient fills give it all a pretty slick look.

Is it overly complicated to allow just the legend colors to be sans gradient; referencing the gradient start or end color & pulling the legend colors from the RGB table array & ignoring the gradient stepping?

Or, perhaps have the legend text use the bar colors; removing the squares?

Personally, I would love to see the gradients stay (or optioned) &, like you, think all bars should reflect data w/ a common appearance.


BTW - thanks for all your time with all this (sorry if I opened a can of worms... :-) )

Pat ~ Davis VP2 6153-Weatherlink-Weather Display-StartWatch-VirtualVP-Win7 Pro-64bit
www.LasCruces-Weather.com   www.EastMesaWeather.com

Offline broadstairs

  • Forecaster
  • *****
  • Posts: 749
Re: New version of wxgraphs package using JPGraph for Weather Display
« Reply #40 on: September 24, 2023, 07:30:58 AM »
I am still in two minds on this, altough now I've seen the solid fills across all bar graphs I am beginning to like it.

You can see the full set with solid colour fills in bar charts at https://www.stella-maris.org.uk/graphsjp1/wxgraphs_test.html

The legend issue may or may not be resolvable depending on what I find out from JPGraph.

Stuart
Ecowitt GW1003 with ultrasonic wind gauge, lightning sensor and PM2.5 sensor with Personal Weather Tablet as a console.