I have made some changes to my steelseries gauges.js script, found at https://www.hosiene.co.uk/weather/lib/s ... /gauges.js. The changes were mainly in the "harmless" section at the top of the script (setting some of the gauges to not display). I also made some changes to the "here there be dragons" part of the script (starting at line 2998) which includes some further variables that are updated with each poll of realtimegauges.txt, for display on another page of mine that has a limited set of gauges.
My problem is that the odometer display doesn't appear within the wind rose gauge - it appears to the left of it - and the word "undefined" is written in the gauge in place of the odometer. You can see this at https://www.hosiene.co.uk/weather/gauges.htm, and the behaviour is the same on my other page.
Are there any javascript experts out there who might point me in the direction of what is going wrong? Functionally everything works as expected, save for the odometer position.
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.1.3 (build 4028) - 20 August 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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
Latest Cumulus MX V4 release 4.1.3 (build 4028) - 20 August 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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
Problem with Odometer not positioned on Rose gauge
Moderator: mcrossley
- mcrossley
- Posts: 13209
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Problem with Odometer not positioned on Rose gauge
Your gauges-ss.css is missing the "odo" class
Code: Select all
.odo {
position: absolute;
top: 67%;
left: 50%;
transform: translateX(-50%);
-webkit-transform: translateX(-50%);
}
-
- Posts: 2659
- 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: Problem with Odometer not positioned on Rose gauge
Thanks Mark - I knew you would know the answer
![Smile :)](./images/smilies/icon_e_smile.gif)
Problem is - it used to work okay before I changed the gauges.js file. The timestamp on the gauges-ss.css file was August 2018 (when I first transferred my website to that server) so I'm a bit puzzled.
I have added the class, and sure enough the odo is now positioned correctly. But I still have the word "undefined" just above the odo in the rose gauge. Any ideas?
Thanks for the help!
- mcrossley
- Posts: 13209
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Problem with Odometer not positioned on Rose gauge
Your language js file is missing the distance entries...
Code: Select all
miles: 'miles',
n_miles: 'n.miles',
km: 'km',