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 4017) - 17 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

SteelSeries Solutions

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

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

Re: SteelSeries Solutions

Post by mcrossley »

gemini06720 wrote:
mcrossley wrote:var myValue = data.newField * 100;...
Is the '* 100' needed for every variables... :)
Yes, if you want to multiply them by 100 ;)
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: SteelSeries Solutions

Post by gwheelo »

Revisited
George, you mentioned something about buying a book
I believe I overstated what to look for in a good book.

After visiting a large bookstore with a wide selection I have tempered my view in consideration of HTML5 & CSS3. I now suggest you find a more general book on website design and another on Javascript. The books that target HTML5 & CSS3 consider you will use only those new standards and not many browsers (even the newest versions) are totally compatible.

Make certain you pick a book that covers "tables", "divs" and other web tags in current use.

I just made an attempt to recast the steelseries gauge page using only HTML 5 and failed miserably - don't bother even trying until today's browsers are up to it - perhaps another year or two.

Don't ignore HTML5 & CSS3 - you will need it eventually.

GW
Image
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: SteelSeries Solutions

Post by gemini06720 »

gwheelo wrote:I just made an attempt to recast the steelseries gauge page using only HTML 5 and failed miserably - don't bother even trying until today's browsers are up to it - perhaps another year or two.
George, could you explain more clearly what you mean by 'recast the steelseries gauge page'!

The default templates (ie: 'gauges-ssT.htm') are already HTML5 compliant - how could you do more than that? Could you be a bit more explicit on what 'failed miserably'.

HTML5 is an improved version of HTML4 (plus all the HTML before) with some new tags and some deprecated tags - I cannot understand how HTML5 would failed.

And, surprisingly enough, most latest releases of the major browsers (even some minor browsers) are compatible with HTML5 ... although they might interpret some tags differently - even Internet Explorer 9 is quite compatible with HTML5... :roll:
tobyspond
Posts: 252
Joined: Fri 24 Jun 2011 5:57 pm
Weather Station: Davis Vantage Pro2
Operating System: Windows 10
Location: Lamoine, Maine, USA

Re: SteelSeries Solutions

Post by tobyspond »

Expanding on having the Wind Direction Gauge labels (Latest & Average) match the two needle colors, I now have the LCD text matching the pointer colors as well. I did this by simply adding two lines (blue) as follows:

if (bLatest) {
mainCtx.fillStyle = pointerColor.medium.getRgbaColor();
mainCtx.fillText(value + "\u00B0", imageWidth / 2 + lcdWidth * 0.05, lcdPosY1 + lcdHeight * 0.35 + lcdFontHeight * 0.38, lcdWidth * 0.9);
} else {
mainCtx.fillStyle = pointerColorAverage.medium.getRgbaColor();
mainCtx.fillText(value + "\u00B0", imageWidth / 2 + lcdWidth * 0.05, lcdPosY2 + lcdHeight * 0.35 + lcdFontHeight * 0.38, lcdWidth * 0.9);
}

You can see the result at tobyspondweather.com/gauges-ss.php

I did run into a problem using online minifiers where the degree symbol was not minified properly. I ended up downloading the Microsoft Ajax Minifier, which gave me the results I wanted.

Kerry
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: SteelSeries Solutions

Post by gemini06720 »

Kerry, thank you for the idea :idea: modification - even works well with my gauges... :)

Also, a BIG thank for the suggestion about the Microsoft Ajax Minifier - indeed, I now prefer this utility to an online one. 8-)

Has anyone tried working with the thermometer gauges - I thought I had the thermometer gauge going but it has been creating problems with the other gauges, probably because of the limitations of the linear gauges and the lack of error checking within the specific code... :(
tobyspond
Posts: 252
Joined: Fri 24 Jun 2011 5:57 pm
Weather Station: Davis Vantage Pro2
Operating System: Windows 10
Location: Lamoine, Maine, USA

Re: SteelSeries Solutions

Post by tobyspond »

Ray,

Happy to help as I have benefited greatly from the wealth of programming knowledge of the various forum members. It has been a steep and ongoing learning curve. I have found the answers to most of my questions in either the forum or the wiki.

Kerry
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: SteelSeries Solutions

Post by gemini06720 »

Kerry, this is exactly (or should exactly be) the purpose of the forum thread 'SteelSeries Solutions' - to build onto the 'generic' SteelSeries Gauges script... :D
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: SteelSeries Solutions

Post by gwheelo »

could you explain more clearly what you mean by 'recast the steelseries gauge page'!
I reviewed three books with "HTM5" in there titles and all three concentrated on the new HTML5 tags and standards suggesting that "old" tags such as "table" and even "div" are out of mode and discouraged. Tags such as "iframe" are not to be considered at all - but that was true even with HTM4. These three books based their examples of proper design on new tags such as "article" and even "column" which is not supported in some new browsers. Following the suggestions of these books I found it impossible (for me at least) to layout Mark's current gauge.html (recast = rewrite) using the tags for which they provide examples. Yes HTML5 standards include most of the old tags but these HTML5 books appear to be heralding just the newest aspects of the standard.

My point was simply to suggest if you are looking for a book you might want a book a bit more general than one that details only the newest tags in the standard.

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

Re: SteelSeries Solutions

Post by mcrossley »

tombstone wrote:
I did run into a problem using online minifiers where the degree symbol was not minified properly. I ended up downloading the Microsoft Ajax Minifier, which gave me the results I wanted.

Kerry
That is the minifier I always use, get the options right and it is pretty effective. I have a shortcut to it on my desktop setup with the options I want so I can just drag'n'drop a script on to it from where ever.

Here is the batch file the shortcut points to:

Code: Select all

@echo Minifying %~n1 to %~n1.min.js ...
@"C:\Program Files (x86)\Microsoft\Microsoft Ajax Minifier\ajaxmin.exe" -JS "%1" -inline:false -clobber:true -analyse -out "%~p1%~n1-min.js"
@pause
Last edited by mcrossley on Thu 01 Mar 2012 10:27 am, edited 1 time in total.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: SteelSeries Solutions

Post by gemini06720 »

George, according to the Quackit pages (among the many HTML5 specific pages I have bookmarked), there are at least 29 new tags (or elements) - true, not all of the tags are supported by all browsers all of the time ... although most of the tags are supported in the most recent releases of all browsers.

George, I have an older HTML5 book (it was published at the early days of HTML5) - it is basically an introduction to the new tags and how they could/should be used - at the time of publication of that book, none of the browsers supported all of the tags.

I understand that the 'table' tag for example should be used for specific reasons but that it should be completely dismissed is nonsense! To discourage the use of the 'div' tag is simply (in my humble opinion) stupid!

George, please have a look at the 'impress' demo page and tell me how those effects could be produced without the use of 'div' tags! :roll: ;)
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: SteelSeries Solutions

Post by gwheelo »

I understand that the 'table' tag for example should be used for specific reasons but that it should be completely dismissed is nonsense! To discourage the use of the 'div' tag is simply (in my humble opinion) stupid!
Ray -

I think you misunderstand my posts! I quite agree with you: to dismiss the "table" tag and the "div" is lunacy. In fact that is the point I was making with my criticism of the HTML5 books that discourage their use. I "failed" to rewrite Mark's code because I attempted to follow the "best practices" as recommended by those books. Personally, I am moving away from the "table" tag - but can not live without the "div". I agree with everything you wrote and that is why after recommending pure (new tags only) books I then said in a subsequent post I was wrong and suggested books that covered the entire range of HTML tags as a better pick.

gw
Image
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: SteelSeries Solutions

Post by gemini06720 »

George, I did not misunderstand you... ;)

I was just expressing my opinions concerning the statements made by the authors of the books that, for example, the 'table' tag and the 'div' tag were out of date/mode and should be discouraged - I think they are/were 'preaching' to themselves hoping the readers would share their views ... obviously, I do not! :mrgreen:

As I indicated, the 'table' tag can and should still be used but for very specific uses - I recently read an online article indicating where and when the 'table' tag should be used but I cannot find its link/reference ... memory problems... :oops:

But, I am certainly not going to abandon the 'div' tag in a foreseeable/near future... 8-)
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: SteelSeries Solutions

Post by mcrossley »

User avatar
krmidas
Posts: 215
Joined: Sat 03 Jul 2010 9:03 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows 10
Location: Lake Zurich, IL; USA
Contact:

Re: SteelSeries Solutions

Post by krmidas »

tobyspond wrote:Expanding on having the Wind Direction Gauge labels (Latest & Average) match the two needle colors, I now have the LCD text matching the pointer colors as well. I did this by simply adding two lines (blue) as follows:

if (bLatest) {
mainCtx.fillStyle = pointerColor.medium.getRgbaColor();
mainCtx.fillText(value + "\u00B0", imageWidth / 2 + lcdWidth * 0.05, lcdPosY1 + lcdHeight * 0.35 + lcdFontHeight * 0.38, lcdWidth * 0.9);
} else {
mainCtx.fillStyle = pointerColorAverage.medium.getRgbaColor();
mainCtx.fillText(value + "\u00B0", imageWidth / 2 + lcdWidth * 0.05, lcdPosY2 + lcdHeight * 0.35 + lcdFontHeight * 0.38, lcdWidth * 0.9);
}

You can see the result at tobyspondweather.com/gauges-ss.php

I did run into a problem using online minifiers where the degree symbol was not minified properly. I ended up downloading the Microsoft Ajax Minifier, which gave me the results I wanted.

Kerry
Roughly where in the file will I find this string?

-Tom
Tom Keramidas, Lake Zurich, IL, USA
Image
tobyspond
Posts: 252
Joined: Fri 24 Jun 2011 5:57 pm
Weather Station: Davis Vantage Pro2
Operating System: Windows 10
Location: Lamoine, Maine, USA

Re: SteelSeries Solutions

Post by tobyspond »

Tom,

Around line 2390 in the steelseries.js file. If you use notepad++ you can easily search for it.

Kerry
Post Reply