Page 1 of 1
Popup Graphs
Posted: Tue 11 May 2021 1:12 pm
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
Re: Popup Graphs
Posted: Tue 11 May 2021 1:18 pm
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
Re: Popup Graphs
Posted: Tue 11 May 2021 3:00 pm
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
Re: Popup Graphs
Posted: Tue 11 May 2021 3:34 pm
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?
Re: Popup Graphs
Posted: Tue 11 May 2021 11:22 pm
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?
Re: Popup Graphs
Posted: Tue 11 May 2021 11:50 pm
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
Re: Popup Graphs
Posted: Wed 12 May 2021 8:14 am
by Hatkit
Don't suppose anyone has a walkthrough guide for integrating jpgraph into the standard website and enabling the popup graphs?
Re: Popup Graphs
Posted: Thu 17 Jun 2021 10:43 pm
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
Re: Popup Graphs
Posted: Sat 28 Aug 2021 4:04 am
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.
Re: Popup Graphs
Posted: Mon 30 Aug 2021 5:12 am
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.
Re: Popup Graphs
Posted: Mon 30 Aug 2021 6:44 am
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.
Re: Popup Graphs
Posted: Mon 30 Aug 2021 6:54 am
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.
Re: Popup Graphs
Posted: Mon 30 Aug 2021 10:17 pm
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.