downloaded and installed, only modified boarder and uk to US setting. Several of the graphs IE Temp/Dew/Humidity last hour say JpGraph Error: 25017 You have specified an min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.
I searched the config file for SetAutoMin and there is no settting in there that matches that…
I’ll take a look. The SetAutoMin value is calculated by the graph script from the actual values of the temperature, however as much as I did test it we have not had any below freezing temps here yet so I have not been able to test it as much as I would have liked.
I just took a copy of your 4 clientraw files and tested the graphs against these. Firstly using metric values it all worked, the I converted to using deg F and inches for rain and again the graphs all worked without any errors. Now I can see the error on your site but so far I’m unable to recreate it. Can you please post a copy of your graphsconf.php so I can try that.
I’ve just taken another look at your errors and can now see why I am unable to recreate them. It is the barometer or pressure values which are wrong in the graphsconf.php, you have to set the valid max/min values for either metric or inches and you still have the metric values set for $pres_automin and $pres_automax, please set the correct values and try again.
Ive made a very few minor changes to the package as I had not realised that the rain tanks did not work well if made larger than my initial size, this is fixed. I’ve added some comments to the graphsconf.php about sizes for the graphs recommending minimum sizes. There are a couple of other minor fixes as well to a couple of graphs. Package is till at the same location.
I think this was the problem with the barometer I use Inches of Mercury inHg I don’t remember seeing these settings before. They were 960 and 1040 so data for in would be would be out of range. Maybe updating the graphsconf_USA.php file would help. Thank you for all your efforts.
$pres_automin = 27; // Sets the min Y axis value, suggest 27 for in and 960 for hPa/MB
$pres_automax = 32; // Sets the max Y axis value, suggest 32 for in and 1040 for hPa/MB
Yes I did point that out in my reply here. I am not going to supply all the variations of country versions for graphsconf as there are too many to keep up with. If you want to fix the graph tanks so the y-axis title for them does not sit in the middle of the tank download the package again and copy just those graphs over and the title will appear correctly on the righthand side. Also I have added some comments recommending minimum values for the x and y sizes for the graphs.
The only thing I am having problem with now is the time zone setting. It does not seem to effect the display but shows up as an error in the error log. I do not know what format it needs for the USA I am in Phoenix we don’t do daylight savings here. Is it even needed? I know Clientraw has the time in it.
The temp graph scales were way off but looking again last night I had missed a . decimal point in one of the settngs…
[22-Dec-2019 13:03:09 America/Phoenix] PHP Fatal error: Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() must be an instance of Exception, instance of ParseError given in /home4/scottsx9/public_html/weather/scripts/jpgraph-4.2.10/src/jpgraph_errhandler.inc.php:158
Stack trace: #0 [internal function]: JpGraphException::defaultHandler(Object(ParseError)) #1 {main}
thrown in /home4/scottsx9/public_html/weather/scripts/jpgraph-4.2.10/src/jpgraph_errhandler.inc.php on line 158
That should work as long as you supply the values in inches. There is no place in WD that provides the historical data - you have to find the yearly totals for yourself and manually edit the graph to supply the correct data for each year and the years, then as long as you have the rain setting to inches the graph will show that as the Y axis title. However this graph does not do conversion for you, you must supply the correct values in inches or mm.
My apologies, when I commented before I thought it did not convert to inches but I was wrong, teach me to look at the code before opening my mouth :oops:.
Anyway you can fix this by changing to the code below if you supply the data in inches, it will only print data to 2 decimal places by the way. If you supply the Y data in mm (which is what WD has in its files) then do not comment out the three lines below the $datay line and it will convert the data to inches.
// This graph has to be manually updated as there is no single file containing all the yearly rain totals
// You have to search through the WD files and manually add the yearly totals to the $datay array in the format shown
$datay=array("11.85","10.54","0");
//if ($rain_conv != 1) {
// array_walk($datay, "MtoI");
// }
//x labels are the years for which you have data
$x = array("2018","2019","2020");
I’ve tested this and it does show the values in inches and displays the correct unit label on the Y axis. At some point I will alter the comments in this graph to better explain what to do.
Hi I installed your graphs and downloaded the jpgraph-4.2.10 version placed in the same graphs folder then I modified the graphsconf.php file
clientraw.txt is on top folder but I can’t get them to work
This is the test https://www.meteopomezia.it/weather28/uploadWV/graphs/wxgraphs_test.html
tips?
I tried to change the paths but nothing #-o
these are the paths I have set
$hostloc = “${WEBROOT}/”; //if your files are in a sub-directory you must add trailing slash
//note you should only need to change the jpgraph directory if you do not use standard names
$jploc = “${WEBROOT}/jpgraph-4.2.10/src/”; //must have trailing slash
The message which shows on your website has a double slash in the path, you need to find out where this is coming from initially. Once you fix that you will see what happens next.