How to setup jpgraphs and wxgraphs

Hi!
I just made graphs on gauges with great help on the first page of this topic. Everythng works fine. Just looking forward to translate graph to Slovenian language.
Thanks guy,s

Here the graphs: http://www.s52sk.com/wmr200/wx.html

Marco

After changing to a new host, I found my jpgraphs stopped working. So I downloaded the latest version of jpgraphs and wxgraphs and it is still not working. Really messed something up here.
https://mad-weather.com/wxgraphs/wxgraphs_test.html right click to view an image and you get the following error Chosen locale file (“lang/en.inc.php”) for error messages does not exist or is not readable for the PHP process. Please make sure that the file exists and that the file permissions are such that the PHP process is allowed to read this file.
But the file is there, so very confused about that.
Error log for wxgraphs gives hundreds of the following type message PHP Warning: imageloadfont(/home/madweather/public_html/jpgraph-4.2.6/src/fonts/FF_FONT0.gdf): failed to open stream: No such file or directory in /home/madweather/public_html/jpgraph-4.2.6/src/gd_image.inc.php on line 92
Those fonts are there from what I can see.
Any help on this would be much appreciated, thank you.
Rosalind
Edited: Played around with this. Renamed the folder to just jpgraph. I now don’t get any errors but just a black page. In Firefox it does say that the image cannot be displayed because it contains errors. Grrrr.

I found an older 3.5 version of jpgraphs to try that and see if it works and I still get the same result. The newest version does not have the src folder, but that shouldn’t make a difference. I get the image cannot be displayed because it contains errors, but I don’t know what the errors are.
The only difference with the hosting is that I am using Litespeed but it is the same php version as previously used and GD is enabled.

I just downloaded the free version of JPGraphs 4.2.6 and it does indeed have an src folder. If yours is missing then something is wrong. If the src folder is missing they graphs will NOT work. Dont know anything about Litespeed web server so cannot help there.

Stuart

Edit: I just tested my install with 4.2.6 using Apache and it works fine.

I have run my site on Litespeed, it will not be a problem.

The first jpgraph did not unzip properly so did it again and got the src folder. I had the contents of the src folder which is why I didn’t initially work out it wasn’t right.

Anyway, it didn’t make any difference they still don’t work.

I did new uploads of both jpgraph and wxgraphs. Edited the graphsconf.php to point to jpgraph, but then I get the same result.

Have also set the path for ttf files.

I also tried setting a hardpath for the WEBROOT and nada.

Flummoxed!

Think I have solved it. I hunted around on the internet for the error and it suggested a blank space in the code.
When I try and edit via my ftp program, for some reason it adds an extra line to the code, no idea why it does this. So edited via a very old Dreamweaver and it doesn’t add the extra lines and so far the test page is working.
Hope this might help someone else.
Rosalind

I had to move my hosting and wxgraphs has stopped working. How do I config it for https://scottsworld.info/weather/index.html as the url changed

https://weather.scottsworld.info/wxgraphs/wxgraphs_IIStest.html I finally got WXgraphs working again under php 7.3 (bluehost my new server only offers 7.0 - 7.3) and jpgraph-4.2.9 (latest version I downloaded. But

Rain gauges all say illegal error

solor 1 hr and 24 hour had a /usr/share/fonts/truetype/arialbd.ttf not found or unreadable error . There is no such .ttf file or even /usr/ path in windows 10 and no /share/ in /users/ , it is fixed by commenting out // the lines referencing that font then they work. No ideas on fixing the illegal error in the rain column gauges though, all of them are affected

You have to instal the Arial fonts yourself in /jpgraph-X.X.X/src/fonts. They can be copied over from Windows 10 (Control Panel/Fonts/Arial/Font Family Detail.

Then all you have to do is change FF_FONTx to FF_ARIAL in lines 29-38 of graphsconf.php

See also Font families and font styles for more info.

No ideas on fixing the illegal error in the rain column gauges though, all of them are affected

Try version JpGraph 4.2.10 (see New version of the JPGraphs for WD using clientraw data (wxgraphs.zip) - #34 by broadstairs - Custom Templates and Scripts - Weather-Watch Forum). Not sure if that’s the reason, but you can but try. . .

Please see my updates in the other thread on Custom Templates & Scripts, I noted that you need 4.2.10 to fix the rain graphs, do not use 4.2.9. There is also an error with the snow graph for which there is a fix in that thread. I dont follow this thread normally but do have email updates on the above mentioned one.

Stuart

Where does one go to change graphs from the metric system to imperial?

Lines 84 onwards in graphsconf.php.

Or you could have started with graphsconf_USA.php - see the ReadMe.txt :slight_smile:

Sorry, but I didn’t see any reference to graphsconf_USA.php in ReadMe. txt


is only showing .1 digit after the decimal point where the other gauges of the same type show 2

Rain
Today: 0.02 Inches @ 7:08 AM where the graph says .0

You might be better to post here New version of the JPGraphs for WD using clientraw data (wxgraphs.zip), the author of the current graphs doesn’t usually monitor this old thread.

My old version of wxgraphs has alternative starting versions of graphsconf but you’re right, the latest version doesn’t. Sorry :oops:

And the answer to your original question is now lines 103 onwards. . .

upgraded web host server last night and have being ironing out some things due to using https but this https://www.hc-iom.co.uk/graphs/wxgraphs.html is giving a font error which i am not sure how to sort already have jpgraph 4.3 on

You need to find out if the server has libgd3 v2.3.0 installed, if it does that is the problem, as yet there does not seem to be a fix despite v2.3.1 being released. Let me know.

Stuart