Page 9 of 17

Re: Cumulus Server Sided JpGraph Graphs

Posted: Mon 17 Nov 2008 8:28 pm
by Paul C
Image

Above relates to my dewpoints which dipped briefly into the negative. Is the graph correct to the shading ? - would it best if the shading filled everywhere ? or even to have no shading at all

Re: Cumulus Server Sided JpGraph Graphs

Posted: Fri 05 Dec 2008 1:14 am
by Fox_Of_The_Wind
How long does it take for the graphs to show the right numbers on the left? Or did I do something wrong???

link deleted I no longer am doing this no point in it if I have to keep the other program updateing all the time.

Re: Cumulus Server Sided JpGraph Graphs

Posted: Fri 05 Dec 2008 7:30 am
by pinto

Re: Cumulus Server Sided JpGraph Graphs

Posted: Fri 05 Dec 2008 11:36 am
by Fox_Of_The_Wind
That was it!! I changed temp.php and it is showing right now. Later today I will changed the rest. Thanks!!

Changed the rest all working great, thanks!!

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 4:28 pm
by aadal
Where to change from AM/PM to 24H?

Image

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 4:50 pm
by TNETWeather
In the graph code, the time is converted to 24 hour using a function called timeto12 in the snippet below:

Code: Select all

debug_out("Xaxis = " . timeto12(substr(ret_value("time"),0,2)));
debug_out("Yaxis = " . ret_value("dew") );
$rx[] = timeto12(substr(ret_value("time"),0,2));
$ry1[] =  ret_value("dew");
By removing that function, you should end up with just the 24 hour values...

Code: Select all

debug_out("Xaxis = " . substr(ret_value("time"),0,2));
debug_out("Yaxis = " . ret_value("dew") );
$rx[] = substr(ret_value("time"),0,2);
$ry1[] =  ret_value("dew");
I will be adding a setting to change that in the configuration when I get back to these which should be shortly after my vacation starts. Been way too busy to touch them lately.

About the only thing I've been able to play with lately has been my new phone (Samsung Omnia SCH-i910)...

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 5:28 pm
by aadal
About the only thing I've been able to play with lately has been my new phone (Samsung Omnia SCH-i910)...
Thanx i was playing with that lines, but no it work when I remove timeto12 :D
Yes go play with your phone.... :lol:

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 8:22 pm
by meteotortosa
I can run your script !! :cry:

My settings:

GraphSettings.php

Code: Select all

############################################################################
# CONFIGURATION INFORMATION
############################################################################
$SITE['version']        = "3.1";
$SITE['hloc']           = "../public_html/liveview/jpgraph/";
$SITE['jpgraphloc']     = "../public_html/liveview/jpgraph/src/";
$SITE['datafile']       = "realtime.log";
$SITE['sitename']       = "MeteoTortosa";
$SITE['bgncolor']       = "#EFEFEF";
$SITE['txtcolor']       = "#22464F";
$SITE['tz']             = "Catalunya";
index.php on /liveview/jpgraph

Code: Select all

<?php
	header("Location: /liveview/jpgraph/index.php") ;
?>
You can see my web here -> http://www.meteotortosa.cat/liveview/
and JpGraph, here -> http://www.meteotortosa.cat/liveview/jpgraph/

Wha's wrong? Can you help me !!

A lot of thanks,
Lluís

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 9:10 pm
by pinto
for a start: where is your realtime.log ?

did you use this: https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=130

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 9:15 pm
by aadal
Have you run thise? http://www.meteotortosa.cat/liveview/jp ... stsuit.php
Is all ok there?
TTF fonts uploded?
Then :

Code: Select all

############################################################################
# CONFIGURATION INFORMATION
############################################################################
$SITE['version']        = "3.1";
$SITE['hloc']           = "../public_html/liveview/jpgraph/";
$SITE['jpgraphloc']     = "../jpgraph/src/";
$SITE['datafile']       = "realtime.log";
$SITE['sitename']       = "MeteoTortosa";
$SITE['bgncolor']       = "#EFEFEF";
$SITE['txtcolor']       = "#22464F";
$SITE['tz']             = "Catalunya";
And is your realtime.log updating evry minute ?

:D

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 10:28 pm
by TNETWeather
aadal wrote: Thanx i was playing with that lines, but no it work when I remove timeto12 :D
Yes go play with your phone.... :lol:
Replace the timeto12 function in GraphSettings.php to:

Code: Select all

function timeto12($inval) {
    global $SITE;
    
    if ($SITE['pm'] == "yes" ) {
        $ckval = intval($inval);
        $wm = "am";
        if($ckval == 12) {
            $wm = "pm";
        }
        if($ckval > 12 ) {
            $ckval -= 12;
            $wm="pm";
        }
        return($ckval . $wm);
    } else {
        return($inval); 
    }
}
And add a new variable to the top of that file's config settings like:

Code: Select all

$SITE['pm']				= 'no';
So that section looks like (Adjusted for your settings of course):

Code: Select all

$SITE['version']        = "3.1";
$SITE['hloc']           = "../";
$SITE['jpgraphloc']     = "../jpgraph/src/";
$SITE['datafile']       = "realtime.log";
$SITE['sitename']       = "Gordon Head, Victoria BC";
$SITE['bgncolor']       = "#EFEFEF";
$SITE['txtcolor']       = "#22464F";
$SITE['tz']             = "US/Pacific";
$SITE['pm']             = 'no';
You should end up with graphs like:

http://vicweather.tnet.com/graphs.php

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 11:24 pm
by firewall
Is there a way to get the baro graph to show four digits instead of two for the baro reading?

Thanks,

Jack

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 11:37 pm
by meteotortosa
pinto wrote:for a start: where is your realtime.log ?

did you use this: https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=130
I forgot this !! :oops:
aadal wrote:Have you run thise? http://www.meteotortosa.cat/liveview/jp ... stsuit.php
Is all ok there?
TTF fonts uploded?
Then :

Code: Select all

############################################################################
# CONFIGURATION INFORMATION
############################################################################
$SITE['version']        = "3.1";
$SITE['hloc']           = "../public_html/liveview/jpgraph/";
$SITE['jpgraphloc']     = "../jpgraph/src/";
$SITE['datafile']       = "realtime.log";
$SITE['sitename']       = "MeteoTortosa";
$SITE['bgncolor']       = "#EFEFEF";
$SITE['txtcolor']       = "#22464F";
$SITE['tz']             = "Catalunya";
And is your realtime.log updating evry minute ?

:D
I have all font here -> http://www.meteotortosa.cat/liveview/jpgraph/fonts/

jpg-config.inc.php

Code: Select all

// DEFINE("CACHE_DIR","/tmp/jpgraph_cache/");
// DEFINE("TTF_DIR","/public_html/liveview/jpgraph/fonts/");
// DEFINE("MBTTF_DIR","/usr/share/fonts/ja/TrueType/");
but I can't get all graphs, don't understand

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 11:47 pm
by meteotortosa
realtimelog.php

Code: Select all

$SITE['version']        = "2.0";
$SITE['home']           = "/liveview/";
$SITE['datafile']       = "realtime.log";
$SITE['source']         = "realtime.txt";
is this ok?

I hope I am sorry for so many questions

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 06 Dec 2008 11:49 pm
by aadal
Thanx all seams to be fine no.
http://www.aadal.biz/~weather/jpgraph/temp.php
Some problems with the temp.
Change from : $SITE['tempunit'] = "&#xb0;" . ret_value("tempunit");
To : $SITE['tempunit'] = " " . ret_value("tempunit");

Tryed thise but only a square visible: :$SITE['tempunit'] = "º" . ret_value("tempunit");
Is there a way to get the baro graph to show four digits instead of two for the baro reading?
Mine show four digits http://www.aadal.biz/~weather/jpgraph/baro.php?freq=2