Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Cumulus Server Sided JpGraph Graphs

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
Fox_Of_The_Wind
Posts: 13
Joined: Sat 29 Nov 2008 1:50 pm
Weather Station: Davis Vantage Pro 2
Location: De Soto Wisconsin USA
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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.
Last edited by Fox_Of_The_Wind on Thu 07 May 2009 1:25 am, edited 1 time in total.
Image
pinto
Posts: 112
Joined: Sat 11 Oct 2008 3:20 pm
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Debian Buster
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post by pinto »

Jozef
Image
Fox_Of_The_Wind
Posts: 13
Joined: Sat 29 Nov 2008 1:50 pm
Weather Station: Davis Vantage Pro 2
Location: De Soto Wisconsin USA
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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!!
Image
User avatar
aadal
Posts: 168
Joined: Tue 04 Nov 2008 8:07 pm
Weather Station: WH 1080
Location: Skodje
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post by aadal »

Where to change from AM/PM to 24H?

Image
  • Windows Vista
Image

Image
TNETWeather

Re: Cumulus Server Sided JpGraph Graphs

Post 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)...
User avatar
aadal
Posts: 168
Joined: Tue 04 Nov 2008 8:07 pm
Weather Station: WH 1080
Location: Skodje
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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:
  • Windows Vista
Image

Image
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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
Weather in Tortosa (NE Spain), updated every 15'
Image Image
pinto
Posts: 112
Joined: Sat 11 Oct 2008 3:20 pm
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Debian Buster
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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
Jozef
Image
User avatar
aadal
Posts: 168
Joined: Tue 04 Nov 2008 8:07 pm
Weather Station: WH 1080
Location: Skodje
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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
  • Windows Vista
Image

Image
TNETWeather

Re: Cumulus Server Sided JpGraph Graphs

Post 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
firewall
Posts: 17
Joined: Sat 29 Nov 2008 4:05 pm
Weather Station: Davis Vantage Pro 2
Location: Branford, CT
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post by firewall »

Is there a way to get the baro graph to show four digits instead of two for the baro reading?

Thanks,

Jack
Image
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
meteotortosa
Posts: 323
Joined: Thu 04 Dec 2008 12:15 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Tortosa-Baix Ebre- Catalonia
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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
Weather in Tortosa (NE Spain), updated every 15'
Image Image
User avatar
aadal
Posts: 168
Joined: Tue 04 Nov 2008 8:07 pm
Weather Station: WH 1080
Location: Skodje
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post 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
  • Windows Vista
Image

Image
Post Reply