Page 1 of 2

Gauges show wrong reading

Posted: Wed 23 Jun 2010 3:16 pm
by sidedraft
On this page:

http://www.sidedraught.com/cumulus/gauges.htm

The gauges read high, but the info box that displays when the cursor is on a particular gauge is correct, why?

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 4:53 pm
by steve
Very strange - it's actually just the temperature ones that are wrong. It's not my code and I'm not a javascript expert, but I'll look into it.

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 5:11 pm
by steve
In IE8 your bars don't display at all; you are using an older version of wz_jsgraphics.js - try the attached updated one. Perhaps that will also fix the other problem.

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 5:34 pm
by sidedraft
I uploaded the new version, no difference. I tried it with IE, Chrome and FF.

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 6:00 pm
by steve
sidedraft wrote:I uploaded the new version, no difference.
Other than that the gauges are not now blank in IE8.

Your page gives the following errors in the Firefox console:

Warning: Error in parsing value for 'width'. Declaration dropped.
Source File: http://www.sidedraught.com/cumulus/gauges.htm
Line: 0

Warning: Error in parsing value for 'height'. Declaration dropped.
Source File: http://www.sidedraught.com/cumulus/gauges.htm
Line: 0

The standard page doesn't give those errors. I have no idea what the errors mean, but as they refer to 'width' and 'height', perhaps they are the reason the gauges are wrong (it seems to be a scaling problem). It's unlikely, I admit, since all but the temperature gauges are OK, but it's the only thing I can think of at the moment.

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 6:31 pm
by steve
I took a copy of your page to play with and tried changing the temperature value. It's adding exactly 20 onto the value, so it's not a scaling problem. Very odd.

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 6:47 pm
by steve
Ah, hold on, I also accidentally copied your javascript and images. If I use the default ones it works fine.

Your dashboard.js has

scale=2/factor;maxm=140;

where mine has

scale=2/factor;maxm=120;

And a number of other changes. I did update the file some time ago; I guess I should put an explicit note on the readme for each release that people should upload all of the files again in case anything has changed.

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 7:13 pm
by sidedraft
Where do I get the "default" ones?

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 7:17 pm
by steve
The same place you got them originally. In the Cumulus installation folder.

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 7:20 pm
by steve
I'd assumed you had upgraded Cumulus and not uploaded the new files. But it looks like there may be a bug in the versions with 1.8.9. The versions I used where it worked OK are from the 1.9.0 beta.

Re: Gauges show wrong reading

Posted: Wed 23 Jun 2010 7:34 pm
by steve
The versions with 1.8.9 appear to be OK. My confusion comes from getting your file and my file the wrong way round above. Yours has the "120", the standard one has "140" and it seems to have been that way for quite a number of versions now. So where did yours come from?

Re: Gauges show wrong reading

Posted: Thu 24 Jun 2010 2:12 am
by sidedraft
I rumbled through the directories that are under Program Files/Cumulus, and I found another dashboard.js.

Internally it has this at the start of the file:
/* Code by David N Brown. Copyright 2006. Version 1.02.00 BETA - 15 Feb 2006
/

I uploaded that file to the server, and the gauges are now correct.

Thanks,

Re: Gauges show wrong reading

Posted: Thu 24 Jun 2010 7:07 am
by steve
sidedraft wrote:I rumbled through the directories that are under Program Files/Cumulus, and I found another dashboard.js.
Yes, the one in 'webfiles' that the help and the wiki tell you to use? But where did your previous one come from, if not from the same place? Does the installer create another version of the file somewhere?

Re: Gauges show wrong reading

Posted: Thu 24 Jun 2010 2:28 pm
by sidedraft
I got the flaky dashboard.js from a previous installation, obviously.

Where in the WIKI does it mention which dashboard.js to use. I did a search on "dashboard", - - not found.

Re: Gauges show wrong reading

Posted: Thu 24 Jun 2010 2:57 pm
by steve
sidedraft wrote:I got the flaky dashboard.js from a previous installation, obviously.
There doesn't appear to be a version of the file that looks like the one you had, going back for several releases. Which version of Cumulus did you have installed, before 1.8.9?
Where in the WIKI does it mention which dashboard.js to use. I did a search on "dashboard", - - not found.
http://wiki.sandaysoft.com/a/Simple_Website_setup

It doesn't specifically mention the dashboard.js file; it's just one of a number of files in the dbimages folder, all of which need uploading.