http://www.kingsteignton-weather.co.uk/jpgraph-1.22/fonts/hardpath.php
Iāve no idea how to supply the path on a windows server thenā¦
Iāve just checked my files (I run Apache on Windows here as a test server) and my paths are defined with forward slashes ā/ā not the usual backslash and it works, and yes it should reference the drive letter on Windows.
Stuart
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.
Stuart
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ā¦
Hi
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.
This is a linux server running php 5.2
Any help much appreciated
Steve
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.
Stuart
I have turned off the antialias everywhere I could see it but still not much luck
Some graphs work and some donāt http://www.stumpey.co.uk/wxgraphs/wxgraphs_test.html which is a bit strange
So still scratching my head #-o
Steve
Your 12 month rain graph works - what is it thatās different about that graph (and one or two others) that makes it not work on my site?
In each graph file there should be a statement saying
$graph->img->SetAntiAliasing(ā$antialiasā);
and in graphconf.php its should say
$antialias = āfalseā;
Stuart
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.
Stuart
Wooo
Thanks Stuart works like a charm
Steve
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.
Stuart
Hi Stuart
Could we have temp+hum_24hr.php as it is missing from the new zip
Regards
Steve
Try again, Iāve just updated it. It gets quite confusing renaming and rewriting all the graphs #-o
Stuart
Thanks Stuart - everything is working perfectly for me now.
I appreciate your help with this.
Cheers
Dave
Thanks Stuart
Hi Suart
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
Regards
Steve
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.
Thanks Stuart
As above in my post i did a quick fix :: resolved the problem just disabled //$graph->yaxis->scale->SetAutoMin(0); in the //y-axis
Steve