I think you have one step missing, you need to add an include to graphSettings.php...
Code: Select all
include $GRAPH['jpgraphloc'] . "jpgraph_windrose.php";
Moderator: mcrossley
Code: Select all
include $GRAPH['jpgraphloc'] . "jpgraph_windrose.php";
I am struggling to set up the popup graphs and could not see the graphsettings.php script anywhere when downloaded and at the moment no graphs are generated in the cache.You need to edit the JPGraph config file to enable caching and point it at your cache folder. Then edit the graphSettings.php script and set the cache folder and jpgraph fodler locations in there.
graphSettings.php is part of the download from this thread, not JPGraphs.forestedge wrote: I am struggling to set up the popup graphs and could not see the graphsettings.php script anywhere when downloaded and at the moment no graphs are generated in the cache.
I'd put the full path in, e.g. something like C:/web/public_html/cache/forestedge wrote: I have uploaded jpgraphs package and defined as below in Windows 7, not sure if this is correct though!
define('CACHE_DIR','/public_html/cache'/');
define('TTF_DIR','/public_html/font'/');
define('USE_CACHE',true);
//('MBTTF_DIR','/usr/share/fonts/TrueType/');//
Code: Select all
jpgraph.php
(as downloaded)
jpg-config.inc.php
define('CACHE_DIR',$_SERVER["DOCUMENT_ROOT"].'/site-utils/jpgraph/cache/');
define('TTF_DIR',$_SERVER["DOCUMENT_ROOT"].'/site-utils/jpgraph/Fonts/');
define('MBTTF_DIR',$_SERVER["DOCUMENT_ROOT"].'/site-utils/jpgraph/Fonts/');
.httaccess
(as downloaded) and placed in the images folder.
gauges.js
imgPathURL : 'images/',
(Take a look for yourself at http://www.pcweather.kcsolutions.com.au ... stsuit.php)PHP Fatal error: require_once(): Failed opening required 'jpgraph/jpgraph_odo.php' (include_path='.:')
If you call the direct link to the cached image using Firefox (i.e. http://www.pcweather.kcsolutions.com.au ... aphhum.png) then it displays the image as it should.The image “http://www.pcweather.kcsolutions.com.au ... aphhum.php” cannot be displayed because it contains errors.
Code: Select all
$graph->title->Set('Wind (' . $GRAPH['uom']['wind']. ')');
Code: Select all
$graph->title->Set('Barograph (' . $data['units']. ')');
Code: Select all
$graph->title->Set('Wind (' . $GRAPH['units']. ')');
Code: Select all
$graph->title->Set('Temperature (°' . $data['units']. ')');
Sorry, nope, not that.... I have confirmed that are both there.mcrossley wrote:Probably missing fonts - I had to add arial.ttf and verdana.ttf to the jpgraphs/fonts folder to get the Wind Rose working.
(A bit further up the thread)
it should read $data['units'] - I'll change the source code...UncleBuck wrote:So I have noticed a couple of other problems that I need some advice with.....
My wind graph (http://www.pcweather.kcsolutions.com.au/images/wind.png) does not show any units in the title. Looking at the original "graphwind.php" file it showed the linewhereas all the other files where units were being passed were using thisCode: Select all
$graph->title->Set('Wind (' . $GRAPH['uom']['wind']. ')');
so I changed it to readCode: Select all
$graph->title->Set('Barograph (' . $data['units']. ')');
the php log (before the change) was showing "Undefined index: uom in .........." and now it shows an error "Undefined index: units in ............." so obviously this did not resolve the issue.Code: Select all
$graph->title->Set('Wind (' . $GRAPH['units']. ')');
Question: Is it possible that the problem is caused by using the units km/h?
If you have edited the file, did you save it as UTF-8 (without MOB)?UncleBuck wrote:Next problem.....
Both temp graphs show an extra character in the title (see http://www.pcweather.kcsolutions.com.au/images/temp.png) which is not in the actual php fileThat one I have no idea on why it would do that as it appears before the degree symbol.Code: Select all
$graph->title->Set('Temperature (°' . $data['units']. ')');
Any ideas.... anyone?
Col.