Stuart,
Thanks for checking. Iāve replaced the ""s with "/"s but unfortunately that made no difference.
Itās really weird that most of the graphs seem to work, but a few donāt.
I canāt think what Iāve done wrong. If I try to directly access one of the php files that donāt work (in IE6) I get:
Notice: Undefined variable: datat in e:\domains\k\kingsteignton-weather.co.uk\user\htdocs\WXGraphs\winddir_1hr.php on line 81
JpGraph Error: HTTP headers have already been sent.
Caused by output from file winddir_1hr.php at line 81.
Explanation:
HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send itās image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).
Most likely you have some text in your script before the call to Graph::Stroke(). If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.
For example it is a common mistake to leave a blank line before the opening ā<?phpā.
I donāt know what that means, but I havenāt fiddled with any of the files.
At a guess it looks like you dont have jpgraph_scatter.php installed with the other jpgraph stuff as at least a couple of the graphs failing use a scatter plot and need this file. It should be in the JPGraphs package.
Nopeā¦ I just checked and everything in the downloaded tar file is also there on the server.
Itās probably something really dumb that Iāve done, or not done, but Iām struggling to figure it outā¦
I am trying to set this up but get an error I have GD and this has been confirmed by the test.php, The gd version is the php supplied version and not the standalone.
Thereās an option for that, right now I cannot remember whereā¦ Oh yes its in the graphconf.php which should be set to false. If that is set correctly then you may need to edit the individual graph files to turn it off.
I think I may have spotted something here. The message says the function ImageAntiAlias() is not supported in your GD version so I think you will have to comment it out in each of the graph files where it says $graph->img->SetAntiAliasing(ā$antialiasā); just comment that line out and try again. Iām not sure but its worth a try.
There have been a few problems recently with the graphs I created and when I fixed them I added some new graphs which I had been working on but forgot about and these had bugs as well :oops: :oops: :oops: #-o#-o#-o
Anyway I have reworked the graph files removing the antialias which seemed to have caused problems for at least one person (its not recommended anyway), and fixed a few others. The new graphs now work and some have also been renamed to make it a bit more logical as to what each one does. There are some new āLast Whole Hourā graphs now built from the clientrawhour file, as well as the original last rolling 60 minutes graphs from the clientraw file. Please review the package and make sure you pick the correct files for inclusion in your websites and modify your HTML as appropriate.
Anyway your can download the zip file here and the test HTML file can be viewed here on my website.
A small problem with the temp+hum_24hr graph when the temps go below 0 they drop off the bottom of the graph!! so it does not scale the - temps got -2 this morningā¦
Edit: Ok resolved the problem just disabled //$graph->yaxis->scale->SetAutoMin(0); in the //y-axis
The problem with this is that if I remove the set scale on the temp part of the graph it will set the temp minimum just below the lowest temp displayed, so with a min of 6 degrees the bottom of the temp graph is 6 not 0. However as you have found when temps go negative it does not work. So it will take a little while for me to sort out the code needed to calculate the minimum scale needed.
I also have some more graphs to add to the package so that it will then graph everything available in the clientraw set of files. Expect an update in a day or so.
Stuart
Edit: Some of the other temp graphs also need changing to accomodate negative values as well, although I think the 31 day temp graph should work OK.
OK I have just uploaded the package again with some extra graphs as well and Iāve also fixed up all the temp graphs so that if you have a negative temp it will graph OK, but if there are no minus values you still get full scale from zero which I feel looks better especially where you have two traces on the graph like temp/hum. Iāve removed the shading on the max/min graph as well since it does not work well with negative temps. If I can work out how to do it differently I might put it back in at a later stage.
Anyway let me know if there are any problems with these files.