Figured it out once I ran some other tests on the php installation. Apparently FreeType wasn’t enabled for some reason. I recompiled php and all is working.
I have just installed jpgraph and wxgraphs. Easy installation and no problems–except one.
I want to use inches of mercury for the barometer setting and have these values in my graphconf.php file:
$pres_conv = 0.0295; // Set to 0.0295 for in of Mercury or 1 for hPa/mb
$pres_unit = "in"; //Set to required value
I get an error saying the minvalue I have set is larger than the max allowed value.
I suspect it should not be “in”. But I am not sure what it should be.
Oh, if I use hPa/mb I have no issues.
Bill
This is for the test graphs im assuming? The barometeer graph has a min max setting and u need to change that after switiching units
Duh!
Thanks.
Bill
Had to modify that a bit for mine…
define(‘TTF_DIR’,‘${WEBROOT}/jpgraph-3.5.0b1/src/fonts/’);
Obviously that was because of the different structure in 3.5.0b1. It still failed. Finally took a copy of Arial from /windoze/fonts/ and dumped it into the jpgraph /fonts/. That DID work, and everything on wxgraphs_test.html finally showed up.
Thanks for the tip in the right direction.
Firstly thanks to everyone in this thread for helping me to get wxgraphs up & running for inclusion in my SteelSeries Gauges.
One thing stumps me (as I am new to php) - how do I produce the drop shadow on the graphs that I see many of you have? Mine are just flat - my test page is here: -
http://www.spireweather.co.uk/wxgraphs/wxgraphs_test.html
Also why do I some errors in place of some of my graphs?
Cheers,
Simon
are you running 3.5?
if so:
remove "required_once(‘jpgraph_theme.inc.php’) from the jpgraph.php script.
Then you will get the drop shadows.
looks like your are missing the arial font or something?
Thanks tman1991, that fixed it. I copied the arial & arialbd fonts to the ttf folder as requested. Is there anything else I should to to sort the problem graphs?
Many thanks for your help,
Did you modify the setup file for the ttf location? read back a few posts there is some discussion on that.
OK I’ve made those modifications to the setup & moved the arial & arialbd files to the arc/fonts directory but I still have those graph errors.
My path is now: -
define(‘TTF_DIR’,‘/home/sites/spireweather.co.uk/public_html/jpgraph-3.5.0b1/src/fonts/’);
See: -
http://www.spireweather.co.uk/wxgraphs/wxgraphs_test.html
Is there anything else I’m missing?
try define(‘TTF_DIR’,‘${WEBROOT}/jpgraph-3.5.0b1/src/fonts/’);
the font thing is very hit or miss… Its very finicky to paths and I’ve seen a few different solutions.
Same result I’m afraid #-o
Any more suggestions? Really appreciate your help.
you have arial.ttf in /jpgraph-3.5.0b1/src/fonts/ ?
Like I said, the font thing is very weird on this…
Or do you have them in ttf folder?
I have fonts in blah/src/fonts and blah/ttf where blah is more path stuff to the jpgraph directory.
My arial is in ttf
so try
try define(‘TTF_DIR’,‘${WEBROOT}/jpgraph-3.5.0b1/ttf/’);
or
define(‘TTF_DIR’,‘/home/sites/spireweather.co.uk/public_html/jpgraph-3.5.0b1/ttf/’);
are your fonts at least 664 on permissions?
The requested URL /jpgraph-3.5.0b1/src/fonts/arial.ttf was not found on this server.
The requested URL /jpgraph-3.5.0b1/ttf/arial.ttf was not found on this server.
I think thats the problem.
where is arial.ttf?
They’re in both locations. Not sure what you mean by on 664 permissions?
Cheers,
664 is a unix number which sets permission bits. As far as read, write, execute. Its possible they are hidden files and not readable.
From your browser do:
http://www.spireweather.co.uk/jpgraph-3.5.0b1/src/fonts/arial.ttf
http://www.spireweather.co.uk/jpgraph-3.5.0b1/ttf/arial.ttf
does either of them work?
if you get errors and not a download prompt that means one of two things.
- the file is NOT there
- it is hidden, or not readable by world permissions.
now that you got it working you can do cool graphs like I have in this page:
The sunposition graph is a jpgraph…
I have been a complete idiot! :roll:
I was using ariali.ttf - missed that extra i on the end. I obviously need an eye examination, even though I’m an optometrist!
You have been very helpful though, and very patient! Thanks.
Wow that is fantastic! I won’t ask how you did it
Simon