Page 1 of 1
Hover readings decimal setting
Posted: Wed 05 Oct 2016 8:42 am
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
Re: Hover readings decimal setting
Posted: Wed 05 Oct 2016 1:17 pm
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
Re: Hover readings decimal setting
Posted: Thu 06 Oct 2016 4:16 am
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.
Regards,
Re: Hover readings decimal setting
Posted: Thu 06 Oct 2016 8:00 am
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.
Re: Hover readings decimal setting
Posted: Thu 06 Oct 2016 9:00 am
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,
Re: Hover readings decimal setting
Posted: Thu 06 Oct 2016 9:38 am
by mcrossley
Hi Tony, the text above the graphs is JS generated, though as you say the graph itself is PHP generated.
Re: Hover readings decimal setting
Posted: Thu 06 Oct 2016 10:09 am
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,
Re: Hover readings decimal setting
Posted: Thu 06 Oct 2016 11:16 am
by mcrossley
Tony, I'm happy to look at one of your HighCharts graphs with the issue if you send a link.
Re: Hover readings decimal setting
Posted: Thu 06 Oct 2016 11:38 am
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,
Re: Hover readings decimal setting
Posted: Tue 11 Oct 2016 3:23 pm
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.
Re: Hover readings decimal setting
Posted: Fri 14 Oct 2016 3:48 pm
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.
Re: Hover readings decimal setting
Posted: Sat 05 Nov 2016 1:07 am
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 !!
No issues on the new one I'm using.
Tony