Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See the Wiki for download

Hover chart popup setup guide for MX

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

liddelljs
Posts: 42
Joined: Sat 31 Oct 2015 10:22 pm
Weather Station: Fine Offset
Operating System: Linux
Location: Perth Western Australia

Hover chart popup setup guide for MX

Post by liddelljs » Sun 07 Aug 2016 6:50 am

Hi All,
Wondering if anyone can point me to a good step by step guide to setting up the hover charts for the steel series gauges on MX for a complete novice. I've done a bit of searching on the forum and have found a few related posts but nothing that seems to describe the process from scratch.

Cheers
Steve

User avatar
mcrossley
Posts: 5209
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover chart popup setup guide for MX

Post by mcrossley » Tue 09 Aug 2016 1:06 pm

Steve, sorry this post slipped off my radar.

There aren't any specific instructions that have been written up as far as I know. I suggest you read this thread which should tell you what you need to know. If you have any questions after that come back and I'll attempt to help you out.

liddelljs
Posts: 42
Joined: Sat 31 Oct 2015 10:22 pm
Weather Station: Fine Offset
Operating System: Linux
Location: Perth Western Australia

Re: Hover chart popup setup guide for MX

Post by liddelljs » Sat 13 Aug 2016 1:05 am

Thanks for the response Mark. Did you mean to add a link to a thread? I don't think it made it into the post.

Cheers
Steve

User avatar
mcrossley
Posts: 5209
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover chart popup setup guide for MX

Post by mcrossley » Sat 13 Aug 2016 5:18 pm

I did mean to add a link. I'm away on holiday at the moment using my phone. But if you search for "CumulusMX server side graphs" I think you should find it.

User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Hover chart popup setup guide for MX

Post by gwheelo » Fri 02 Sep 2016 9:19 pm

Me too - need some help with MX popup gauge images. Perhaps if you describe the process of the gauges page fetching the images via the JSON data I can work out the files and directories on my own. In other words the working steps from the gauges js code through the JSON, cache, and jpgraphs directories. For me, as usual, this will be a learning exercise.

gwheelo
Image

User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Hover chart popup setup guide for MX

Post by gwheelo » Sun 04 Sep 2016 9:17 pm

Still trying to configure SS pop-up gauge graphs on my gauge page.

File structure is:

JSON data upload goes to: wheelocknet.net/cumulus/
JSON scripts are in: wheelocknet.net/images/JSON/
jpgraph files are in: wheelocknet.net/images/jpgraph/
cache dir is: wheelocknet.net/images/cache/
.htacess is located in: wheelocknet.net/cumulus/

Now what do I use for paths in:
gauges_ss.js
graphSettings.php
jpg-config.inc.php

Help please - any push will be most gratefully thanked!

gwheelo :?
Image

User avatar
mcrossley
Posts: 5209
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover chart popup setup guide for MX

Post by mcrossley » Mon 05 Sep 2016 8:42 am

gwheelo wrote:Still trying to configure SS pop-up gauge graphs on my gauge page.

File structure is:

JSON data upload goes to: wheelocknet.net/cumulus/
JSON scripts are in: wheelocknet.net/images/JSON/
jpgraph files are in: wheelocknet.net/images/jpgraph/
cache dir is: wheelocknet.net/images/cache/
.htacess is located in: wheelocknet.net/cumulus/

Now what do I use for paths in:
gauges_ss.js
graphSettings.php
jpg-config.inc.php

Help please - any push will be most gratefully thanked!

gwheelo :?
And where is the web page?

User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Hover chart popup setup guide for MX

Post by gwheelo » Mon 05 Sep 2016 9:38 am

And where is the web page?
Details! :oops: :oops: :bash:

http://www.wheelocknet.net/medes_cam/medes_gauges.html

gwheelo
Image

User avatar
ConligWX
Posts: 728
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.5 Stretch
Location: Bangor, NI
Contact:

Re: Hover chart popup setup guide for MX

Post by ConligWX » Mon 05 Sep 2016 12:40 pm

I noticed your using an old version of CumulusMX. (3028) any reason why? thats over a year old, and latest is now 3041.
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2 Plus - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS Templates

User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Hover chart popup setup guide for MX

Post by gwheelo » Mon 05 Sep 2016 12:59 pm

I noticed your using an old version of CumulusMX. (3028)
- No reason other than it is working (lazy) - I will update, however. Thanks for the heads up!

gwheelo
Image

User avatar
mcrossley
Posts: 5209
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover chart popup setup guide for MX

Post by mcrossley » Mon 05 Sep 2016 3:52 pm

gwheelo wrote:Still trying to configure SS pop-up gauge graphs on my gauge page.

File structure is:

JSON data upload goes to: wheelocknet.net/cumulus/
OK, I see the data.
gwheelo wrote:JSON scripts are in: wheelocknet.net/images/JSON/
I don't see these, was expecting graphHum.php etc in there?
gwheelo wrote:jpgraph files are in: wheelocknet.net/images/jpgraph/
I don't see anyhting there - 404 on all the files I would expect, are they hidden?
gwheelo wrote:.htacess is located in: wheelocknet.net/cumulus/
Is that the .htaccess supplied with the graphs? It should really be in the images folder along with the scripts.
gwheelo wrote: Now what do I use for paths in:
gauges_ss.js
graphSettings.php
jpg-config.inc.php
gauges_ss.js should be pointing to "/images/JSON/"

graphSettings.php - You can use the server document_root (which *should* be set to the path of web server root folder) then to the folders...
$GRAPH['jsonloc'] = $_SERVER["DOCUMENT_ROOT"].'/images/JSON/';
$GRAPH['jpgraphloc'] = $_SERVER["DOCUMENT_ROOT"].'/images/jpgraph/'
If that doesn't work, then just use the full system path from the root of the drive holder you web server folder, e.g...
'/<system-path>/<web-folder>/images/JSON/'

jpg-config.inc.php
define('CACHE_DIR',$_SERVER["DOCUMENT_ROOT"].'/images/cache/');
define('TTF_DIR',$_SERVER["DOCUMENT_ROOT"].'/images/cache/');
(again same caveat as above - use the full path if all else fails)

User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Hover chart popup setup guide for MX

Post by gwheelo » Fri 09 Sep 2016 2:52 pm

I took a time out the past few days to recover from a HD failure - everything is back in order now so I will start over with the current state of file locations.

The gauge page is at wheelocknet.net/medes_cam/medes_gauges.html

My gauges.js is located at wheelocknet.net/medes_cam/gauges/ss_gauges.js

JSON data is uploaded to wheelocknet.net/cumulus/tempdata.json (for example)
jpgraph scripts are in wheelocknet.net/cumulus/images/jpgraph/jpgraph.php (for example)
JSON scripts are located in wheelocknet.net/cumulus/JSON/graphSettings.php (for example)

cache dir is at wheelocknet.net/cumulus/images/cache/ (currently empty).

My same questions remain - paths, .htaccess location etc.

gwheelo
Image

User avatar
mcrossley
Posts: 5209
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover chart popup setup guide for MX

Post by mcrossley » Fri 09 Sep 2016 3:34 pm

I'd start with...

gauges_ss.js should be pointing to "/cumulus/images/JSON/"

graphSettings.php - You can use the server document_root (which *should* be set to the path of web server root folder) then to the folders...
$GRAPH['jsonloc'] = $_SERVER["DOCUMENT_ROOT"].'/cumulus/images/JSON/';
$GRAPH['jpgraphloc'] = $_SERVER["DOCUMENT_ROOT"].'/cumulus/images/jpgraph/'
If that doesn't work, then just use the full system path from the root of the drive holder you web server folder, e.g...
'/<system-path>/<web-folder>/cumulus/images/JSON/'

jpg-config.inc.php
define('CACHE_DIR',$_SERVER["DOCUMENT_ROOT"].'/cumulus/images/cache/');
define('TTF_DIR',$_SERVER["DOCUMENT_ROOT"].'/cumulus/images/cache/');
(again same caveat as above - use the full path if all else fails)

But again I get a 404 on the http://wheelocknet.net/cumulus/JSON/graphSettings.php file?
Edit: Ah, it should be: http://wheelocknet.net/cumulus/images/J ... ttings.php.

The .htaccess file should be in wheelocknet.net/cumulus/images/JSON/ folder.

User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Hover chart popup setup guide for MX

Post by gwheelo » Sun 11 Sep 2016 8:42 pm

Edit: Ah, it should be: http://wheelocknet.net/cumulus/images/J ... ttings.php.
- :bash: :bash:

As usual you have zeroed in on my biggest problem - lack of attention and no respect for details!

But, in spite of all that and various adjustments (both code and attitude) there is success: http://www.wheelocknet.net/medes_cam/medes_gauges.html

Now - how do I get the windrose.png to display at a 1:1 ratio rather than squished. The php script produces a 400 X 400 px image but the tool tip displays a flattened image. Is there some way of achieving the original image w, h ration in the tool tip.? Obviously, I haven't found the solution.

My most grateful thanks, Mark, for your continuing patience and advise.

gwheelol
Image

User avatar
mcrossley
Posts: 5209
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover chart popup setup guide for MX

Post by mcrossley » Mon 12 Sep 2016 1:46 pm

You'll have to override the CSS for that particular tooltip.

After the tooltips are created, modify the windrose one with some local styling on the image, e.g.

$('#imgtip10_img').css({width: 300, height: 300});

Insert in the ddimgtooltip.init() function almost at the end of the script - after the $targets.each() loop

Post Reply