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 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

Hover readings decimal setting

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

Post Reply
rlagreid
Posts: 4
Joined: Tue 04 Oct 2016 1:00 pm
Weather Station: Davis Vantage Pro 2
Operating System: Debian

Hover readings decimal setting

Post by rlagreid »

HI,

The hover pop up display in steel series comes up with far too many decimals when metric units are selected. In imperial units it looks OK.
See http://torolmen.no/database/ss/gauges-ss-basic.htm
Can I control/change this?

Se enclosed image for reference:
Skjermbilde 2016-10-05 kl. 10.38.17.png
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12697
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover readings decimal setting

Post by mcrossley »

I've never seen that before. The gauge-data.txt file contains the values with many decimal places for some reason.

I see you are using weewx, is there anything in weewx that can control this?

For instance the weewx variable $current.outTemp.raw = 8.61111111111
User avatar
BeaumarisWX
Posts: 360
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Hover readings decimal setting

Post by BeaumarisWX »

Is it possible in the graph.php files it is a Floating Point issue.
Try adding the folowing near the top of each graph.php file, just a thought.

Code: Select all

ini_set('precision', 6);
Regards,
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
User avatar
mcrossley
Posts: 12697
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover readings decimal setting

Post by mcrossley »

Hi Tony, I don't think that would work. The JSON data supplied by weewx has the extra decimal places, the JS that displays them doesn't do any rounding - unless unit conversion is required - it just displays them as-is. The JS could do rounding of the supplied values but I've never come across a need for it before, even with weewx. Says to me something has changed in weewx or there is something unique about rlagreid's set-up.
User avatar
BeaumarisWX
Posts: 360
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Hover readings decimal setting

Post by BeaumarisWX »

Hi Mark,
Fare enough matey, I just though as it was being displayed incorrectly in the .php (not .js) based mouse over graphs that it may be related to a similar issue I had ages ago with same, and my work around was as above.
Cheers,
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
User avatar
mcrossley
Posts: 12697
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover readings decimal setting

Post by mcrossley »

Hi Tony, the text above the graphs is JS generated, though as you say the graph itself is PHP generated.
User avatar
BeaumarisWX
Posts: 360
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Hover readings decimal setting

Post by BeaumarisWX »

Hi Mark,
I think maybe your earlier comment:
Says to me something has changed in weewx or there is something unique about rlagreid's set-up.
May be the gel here as I obviously have a similar situation in that many of even the Highchart scripts that I use of yours, will display the same issue on highchart mouseover unless I include the above mentioned in the header of that particular page. I have never fathomed out what the core underlying cause is, though I spent weeks a year ago finding this work around. They well may not be related, though curious to test.
Regards,
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
User avatar
mcrossley
Posts: 12697
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover readings decimal setting

Post by mcrossley »

Tony, I'm happy to look at one of your HighCharts graphs with the issue if you send a link.
User avatar
BeaumarisWX
Posts: 360
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Hover readings decimal setting

Post by BeaumarisWX »

Hi Mark, Greatly appreciated. It's been over 12 months now, though will remove all instances of the fix on all pages to figure out where they all where over the weekend and get back to you. There where a fair few and can't remember which ones and as a safe guard recall applying the fix to many pages and at high level like the header - so will have to go back through every page and int out all inclusions - once done and I find one - will send you a link.
Kind Regards,
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
rlagreid
Posts: 4
Joined: Tue 04 Oct 2016 1:00 pm
Weather Station: Davis Vantage Pro 2
Operating System: Debian

Re: Hover readings decimal setting

Post by rlagreid »

Hi,

I didn't see your replies before now.
Yes, I am using Weewx, Mark.
How do I find "the weewx variable $current.outTemp.raw"?
I am as you may understand not too deeply into the bits and bytes of the solution and are quite happy with the results I have managed to get so far. This is sort of icing of the cake. :-)
From your reply I interpret that I should ask the question in the weewx forum instead.
Correct?

Rune.
User avatar
mcrossley
Posts: 12697
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Hover readings decimal setting

Post by mcrossley »

A bit delayed by my holiday, but - yes, I'd ask on the weewx forum. I could code around it but it sounds like a solution from weewx would be better.
User avatar
BeaumarisWX
Posts: 360
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Hover readings decimal setting

Post by BeaumarisWX »

Hi Mark,
A tad late but I finally got around to removing all instances of that fix I had mentioned above and no issues.
So trawled back through my archived changes and realized I had the issue on a previous host server I was using (must have been that server related). Now will never know !! :D
No issues on the new one I'm using.
Tony
Tony Beaumaris, Tasmania (AUS)

CMX Mobile : https://beaumaris-weather.com/BWX/
CMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Click below for Saratoga Template :
Image
Post Reply