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

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 »

comment out

Code: Select all

$graph->yscale->SetAutoMax(10);
like

Code: Select all

//$graph->yscale->SetAutoMax(10);
in rain.php
Jozef
Image
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 »

pinto wrote:comment out

Code: Select all

$graph->yscale->SetAutoMax(10);
like

Code: Select all

//$graph->yscale->SetAutoMax(10);
in rain.php
Jozef - thanks for that - I have upgraded it to 25.
Would in not be better if the graph sorted this out itself, self increased the yscale as the month etc goes on, or you have a huge downfall one day ?
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
TNETWeather

Re: Cumulus Server Sided JpGraph Graphs

Post by TNETWeather »

Paul C wrote: Jozef - thanks for that - I have upgraded it to 25.
Would in not be better if the graph sorted this out itself, self increased the yscale as the month etc goes on, or you have a huge downfall one day ?
Actually it would, but I had nothing to test it with. It doesn't rain here much, last rain was 0.01" and that was 36 days ago, hence the slogan for Phoenix, It's a Dry Heat!.... so someone that gets a lot of rain, would use quite a different scale. The scale included in the graphs, worked well with my limited (or better, none) rain fall.

One of the advantages of the scripts is unlike Cumulus itself which you don't have the source code to, the scripts come with the source, so that people can change how they work, how the look, colors, wording etc...

I would expect people to make changes to the graphs to match the theme they use, colors, wording etc... rather than use them stock as they come.
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 »

Kevin

Understood your last point which wasnt a criticism on my part. I just assumed that the graph/chart would automatically adjust the axis depending on the value.

As I use the graphs more and more I am slowly learning how to alter some aspects to suit my needs.

One slight question - top right hand side of each graph is the date - the number 2008 needs to be brought inside the graph just a touch so it doesnt overlay the graph edge, can you help me where I can change this.

Many thanks for a great package ;)
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
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 »

Paul C wrote: One slight question - top right hand side of each graph is the date - the number 2008 needs to be brought inside the graph just a touch so it doesnt overlay the graph edge, can you help me where I can change this.
I hope this helps:
In every xxx.php you will find the folowing for how you control the date on the right top of each graph:

Code: Select all

$txt3=new Text(date("M j Y",time()));
$txt3->SetFont(FF_VERDANA, FS_BOLD,8);
$txt3->SetPos(0.78,0.015,"left","top");
$txt3->SetColor("azure4");
$graph->AddText($txt3);
1.First line: define the text "M j Y" ~ Nov 11 2008
if you change the order to "j M Y" you have 11 Nov 2008

2.second line: font
FF_VERDANA ~ the font-name FF_ARIAL and so on
FS_BOLD ~ FS_NORMAL ~ FS_ITALIC (You must have those available, when you choose to use another)
8 ~ size

3.third line: position 0.78 ~horizontal ~ x = between 0.0 and 1
0.015 vertical y between 0.0 and 1
left ~ where you start (the left side of your graph) == 0.0
top ~ same here but vertical

4.fourth line: color to display the text

5.fifth line: add the text to the graph

EDIT: Don't forget to upload your file after editing
Jozef
Image
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 »

0.7 appears to work a little clearer and brings the date away from the edge. Also changed the date format around to the UK version

$txt3=new Text(date("j M Y",time()));
$txt3->SetFont(FF_VERDANA, FS_BOLD,8);
$txt3->SetPos(0.7,0.010,"left","top");

many thanks
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
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 »

Paul C wrote:0.7 appears to work a little clearer and brings the date away from the edge. Also changed the date format around to the UK version

$txt3=new Text(date("j M Y",time()));
$txt3->SetFont(FF_VERDANA, FS_BOLD,8);
$txt3->SetPos(0.7,0.010,"left","top");

many thanks
only an addition:
You can use something like 0.7888 and so on, so you can adjust to the pixel you want the text to show
Jozef
Image
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 »

pinto wrote:
Paul C wrote:0.7 appears to work a little clearer and brings the date away from the edge. Also changed the date format around to the UK version

$txt3=new Text(date("j M Y",time()));
$txt3->SetFont(FF_VERDANA, FS_BOLD,8);
$txt3->SetPos(0.7,0.010,"left","top");

many thanks
only an addition:
You can use something like 0.7888 and so on, so you can adjust to the pixel you want the text to show
I soon realised how sensitive it was - I tried 2.0 first and it disappeared to the left > Just for fun here is my indoor graph.
Image
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
TNETWeather

Re: Cumulus Server Sided JpGraph Graphs

Post by TNETWeather »

My indoor now tracks outdoor to an extent.

The window is wide open... to reduce the need for Air Conditioning...

Image

Due to the servers in the office (home office), the room has its own heating... If I close the window, and shut the door it would settle to close to 90°F. With the window open (this time of year), it maxes out at around 83-84°F and drops at night in the mid-70's.

Humidity in the room stays around 22-35% most of the time. You can see the swing of humidity outside, goes up at night when the air is cooler and drops when it heats up.

Later in the season we will start to see even drier humidity levels. Record low for the station is 2% humidity.

Best temps in the country started about a week ago and will last until around mid-April before it "gets too hot" for some. Snow birds are already flocking to Phoenix now... (people who live in colder parts of the country that move here for the winter).
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 »

Perhaps a move to Arizona may fix my knee, always feels worse in damp weather.

On another note I do appear to have a problemn with my graphs this morning.

If you use the link- http://www.bramptonweather.co.uk/cumulus/graphs.php all the graphs look fine. But if you pick off one on its own eg
Image

I now have 9am all the way across ??- any ideas of whats up. I did have to do a reboot of the PC at 9am due to a windows update, but I woulndt have thought would cause a problem. PC was up and running within 10mins

I have added a photo version of the chart in case in corrects itself
Image
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
TNETWeather

Re: Cumulus Server Sided JpGraph Graphs

Post by TNETWeather »

The graph code plots the data it finds.

You can see what it "found" by using the debug option.

In your case, that would look like:

Code: Select all

http://www.bramptonweather.co.uk/cumulus/rain.php?freq=2&debug
Since using freq=2 means it looks at the time 4 times an hour (00,15,30,45 minutes) and you are showing more than 4 times per hour for the 9am hour, that would indicate you have either duplicate dates in your data or something else wrong with your data.

For 9am as an example, you have 27 entries shown in debug... so there were 27 entries that matched 9:XX where XX = 00, 15, 30 or 45.

Whiche when you look at your log shows exactly that:

Code: Select all

2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
So the graph displayed what it found.
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 »

Thanks for that.

So it looks possible that the realtime file has become corruputed this morning ? is this the reason. Is it a cumulus fault or something else.

Steve/Kevin - any thoughts ?
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus Server Sided JpGraph Graphs

Post by steve »

Your cron job runs once a minute and adds the current realtime.txt file to the end of the realtime.log file. For the 20 minutes that Cumulus wasn't running, the realtime.txt file wasn't updated, so the same file got added each time.

Steve
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 »

Thanks Steve.
Is there anything that can be done to prevent this ? - or is it just one of those things. At the end of the day its not much of a problem in the grand scale of things, the graph will catch up again after a while.
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
TNETWeather

Re: Cumulus Server Sided JpGraph Graphs

Post by TNETWeather »

Paul C wrote:Thanks Steve.
Is there anything that can be done to prevent this ? - or is it just one of those things. At the end of the day its not much of a problem in the grand scale of things, the graph will catch up again after a while.
The graph script could get smarter to drop duplicate times... it just makes the script more complicated.

Its perhaps easier than trying to modify the realtimelog script to see the duplicates instead since right now, it just appends without regard to what is already there.
Post Reply