Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

Popup Graphs

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
Hatkit
Posts: 30
Joined: Mon 22 Oct 2012 7:11 am
Weather Station: Davis VP
Operating System: Windows 11
Location: Cornwall
Contact:

Popup Graphs

Post by Hatkit »

What edits to the gauges.js file have to be made in order for the popup graphs to be displayed correctly? up to now every time I've tweaked the settings I've only managed to get empty graph boxes showing. I use the latest version of chrome as my browser and am running the latest version (3130) of MX with the built in web pages.

www.treviskeyweather.co.uk
water01
Posts: 3244
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Popup Graphs

Post by water01 »

I believe the only way to do this even with the new default website is to add the server side graphs as per this Topic viewtopic.php?f=40&t=13189
David
Image
User avatar
PaulMy
Posts: 3826
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Popup Graphs

Post by PaulMy »

Hi,
I use the standard template without any edits and the graphs display when hovering over top of the gauges
http://komokaweather.com/cumulusmx/gauges.htm
http://komokaweather.com/cumulusmx/graphTempOut.php

Do you have Daily Graph File Settings to Generate and FTP Transfer?
I don't see these on your site http://www.treviskeyweather.co.uk/graphTempOut.php

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
Image
freddie
Posts: 2471
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Popup Graphs

Post by freddie »

The graphTemPopout.php isn't part of the standard site - no server side PHP in the standard site. You must've customised it?
Freddie
Image
water01
Posts: 3244
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Popup Graphs

Post by water01 »

He has by using the jpgraph server code, but I have been trying and cannot get it to work, so how did you do it Paul?
David
Image
User avatar
PaulMy
Posts: 3826
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Popup Graphs

Post by PaulMy »

Hi David,
I just FTP the full \webfiles folder with each new version update.
The only changes I make is in the js/noaarpts.js to change the path to the NOAA reports folder, and replace the default bird image.

In CumulusMX settings I have ticked 'I want to use the supplied default web site', and in Data series visibility I have ticked everything.
I also have the MXUI template in the same folder but don't think that has any affect. The MXUI template has a \jpgraph subfolder with various jpgraph files but I am not familiar with them - I just upload them as instructed :)
http://www.komokaweather.com/cumulusmx/gauges.htm
http://www.komokaweather.com/cumulusmx/gauges.php

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
Image
Hatkit
Posts: 30
Joined: Mon 22 Oct 2012 7:11 am
Weather Station: Davis VP
Operating System: Windows 11
Location: Cornwall
Contact:

Re: Popup Graphs

Post by Hatkit »

Don't suppose anyone has a walkthrough guide for integrating jpgraph into the standard website and enabling the popup graphs?
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Popup Graphs

Post by Phil23 »

Just tried this on my test site,
http://weather.inverellit.com/new/gauges.htm

It's not quite right yet, the data window's too narrow.

Here's what I did. Hope it helps.

Cheers

Phil



Downloaded jpgraphs.
https://jpgraph.net/download/
uploaded contents of C:\Downloads\jpgraph-4.3.4.tar\jpgraph-4.3.4\src to.....
http://weather.inverellit.com/new/jpgraph/

Downloaded mcrossley/Cumulus-MX-Gauge-Graphs from here....
https://github.com/mcrossley/Cumulus-MX-Gauge-Graphs/
Un-Zipped & uploaded all the files from C:\Downloads\Cumulus-MX-Gauge-Graphs-master\JSON to.....
http://weather.inverellit.com/new/images/

Edited http://weather.inverellit.com/new/jpgra ... ttings.php like this,

Noting that I'm running the new pages as a test site in a subfolder called new,
so my JSON's aren't on the same level.

Code: Select all

############################################################################
# CONFIGURATION INFORMATION
############################################################################
$GRAPH['version']        = '1.8';
$GRAPH['width']          = 600;
$GRAPH['height']         = 300;
$GRAPH['jsonloc']        = '/home/inv49478/public_html/weather/';
//$GRAPH['jsonloc']        = '/';         // NOTE: This is the *server* operating system path to the file, so unless you have added
                                        // the web folder to your PHP path, it will be something like "/home/<userid>/www/"
$GRAPH['jpgraphloc']     = '/home/inv49478/public_html/weather/new/jpgraph/';  // NOTE: Same path type as json above
$GRAPH['cachetime']      = 10;
$GRAPH['rosePoints']     = 16;  // 8 or 16
$GRAPH['roseSize']       = 400;
// Localised Compass point array
$GRAPH['compass']        = array('N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW');
#---------------------------------------------------------------------------
Tested it by opening this URL to see I gat an image...
http://weather.inverellit.com/new/image ... empOut.php

Edited gauges.js to enable the pop-up.
Around line 55.

Code: Select all

            digitalFont        : false,                  // Font control for the gauges & timer
            digitalForecast    : false,                  // Font control for the status display, set this to false for languages that use accented characters in the forecasts
            showPopupData      : true,                   // Pop-up data displayed
            showPopupGraphs    : true,                  // If pop-up data is displayed, show the graphs?
            mobileShowGraphs   : false,                  // If false, on a mobile/narrow display, always disable the graphs
            showWindVariation  : true,                   // Show variation in wind direction over the last 10 minutes on the direction gauge
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Popup Graphs

Post by Phil23 »

Was planning on finalising this post & then trying to add the info to the Wiki for Future reference,
But I'm stuck on the Windrose.

Can't seem to get it to work.

I have got it working here, but did that years ago, https://weather.inverellit.com/images/graphWindRose.php

The install I'm trying to document returns a 500 error, https://weather.inverellit.com/images/n ... ndRose.php

Have checked the settings in both sites, but can't find the issue,
and if I do enable the last line of the includes in graphSettings.php all the graphs fail.

I do recall there was some special requirement for the Windrose, but not the details.

Code: Select all

############################################################################
# Includes for JpGraph
############################################################################
include $GRAPH['jpgraphloc'] . 'jpgraph.php';
include $GRAPH['jpgraphloc'] . 'jpgraph_line.php';
include $GRAPH['jpgraphloc'] . 'jpgraph_scatter.php';
include $GRAPH['jpgraphloc'] . 'jpgraph_date.php';
include $GRAPH['jpgraphloc'] . 'jpgraph_plotline.php';
# include $GRAPH['jpgraphloc'] . 'jpgraph_windrose.php';


Anyone able to steer me in the right direction?

Thanks

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Popup Graphs

Post by Phil23 »

Bit more information,

The error recorded is:-

Code: Select all

[30-Aug-2021 02:49:45 UTC] PHP Fatal error:  Uncaught Error: Class 'WindroseGraph' not found in /home/inv49478/public_html/weather/new/images/graphWindRose.php:112
Stack trace:
#0 {main}
  thrown in /home/inv49478/public_html/weather/new/images/graphWindRose.php on line 112
Not Sure what the issues with line 112 of graphWindRose.php is though.

Code: Select all

// First create a new windrose graph with a title
$graph = new WindroseGraph($GRAPH['roseSize'], $GRAPH['roseSize'], $name, $GRAPH['cachetime']);
$graph->title->Set('Windrose (' . $w2['units'] . ')');

Or does it mean the Class is missing somewhere else?

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Popup Graphs

Post by Phil23 »

All sorted now.

Was important to read what Mark says at the bottom of the GIT page.

https://github.com/mcrossley/Cumulus-MX-Gauge-Graphs/

Have two other sites to install on so will try & put together a Step by Step for the Wiki.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
freddie
Posts: 2471
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Popup Graphs

Post by freddie »

Your code is trying to create an instance of the WindroseGraph class but is unable to do so. This could be due to the class not being visible to the code at that point, or there could be an error with the instantiation statement in line 112 - something like spelling or case of the class, or too many parameters being passed. It's tricky to say without seeing the code, but the compiler is giving a clear steer in its error message.
Freddie
Image
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Popup Graphs

Post by Phil23 »

Thanks Freddie,

We must have crossed in time.
All sorted now & showing here, http://weather.inverellit.com/new/gauges.htm

Just need to now take my time in doing the other two site & try & document well along the way.

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Post Reply