How to setup jpgraphs and wxgraphs

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 :smiley:

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 :frowning:

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 :smiley: :smiley: :smiley:

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 :smiley:

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 :smiley:

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

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.

Stuart

Hi Suart

I get errors on the month_hilo_temp so have had to disable these as it errors on line 27 and 47

//Check for negative values in array and do a SetAuotMin(0) if none

//array_walk($datax, “NegVal”);

//if ($negvalue == 0) $automin = ‘$graph->yaxis->scale->SetAutoMin(0);’;

//else $automin = ‘’;

//Check for negative values in array and do a SetAuotMin(0) if none

//array_walk($datalow, “NegVal”);

//if ($negvalue == 0) $automin = ‘$graph->yaxis->scale->SetAutoMin(0);’;

//else $automin = ‘’;

Otherwise looks better as a line

regards
Steve

You should replace all the graphs you are using with the new versions and the new graphsconf file before testing the graphs. The updated graphsconf.php contains the new function.

Stuart

That sorted it… :smiley:

Steve

Hi all
I set graphs and most of them are OK
But I have few JpGraphs Error
“You have specified a min value with SetAutoMIn() which is larger then the maximum value used for the scale. This is not possible”

This is my test page http://www.knjazevac.co.yu/wxgraphs/wxgraphs_test.html
My units for temperature is