Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 736: | Rivi 736: | ||
tstr = 'Ei tuoreita havaintoja'; | tstr = 'Ei tuoreita havaintoja'; | ||
} | } | ||
up = Math.round( (tavg/30)*50 ); | |||
up = Math.max( up, 0 ); | |||
up = Math.min( up, 50 ); | |||
a1 = 60 - up; | |||
a2 = 9 + up; | |||
hue = 240 * ( 50-up ) / ( 50 ); | |||
rgb = hslToRgb( hue/360, 0.8, 0.5 ); | |||
fill = '#' + rgb[0].toString(16) + rgb[1].toString(16) + rgb[2].toString(16); | |||
var tsvg = '<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">'; | var tsvg = '<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">'; | ||
tsvg += '<style type="text/css">.tscale{fill:none;stroke:#1E1E1E;stroke-width:2;stroke-miterlimit:10;}.toutline{fill:none;stroke:#1E1E1E;stroke-width:4;stroke-miterlimit:10;}'; | tsvg += '<style type="text/css">.tscale{fill:none;stroke:#1E1E1E;stroke-width:2;stroke-miterlimit:10;}.toutline{fill:none;stroke:#1E1E1E;stroke-width:4;stroke-miterlimit:10;}'; | ||
tsvg += 'ttemp{fill: | tsvg += 'ttemp{fill:' + fill + ';}'; | ||
tsvg += '</style>'; | tsvg += '</style>'; | ||
tsvg += '<g>'; | tsvg += '<g>'; | ||
| Rivi 753: | Rivi 765: | ||
tsvg += '<line class="tscale" x1="60.6" y1="53.5" x2="66.2" y2="53.5"/>'; | tsvg += '<line class="tscale" x1="60.6" y1="53.5" x2="66.2" y2="53.5"/>'; | ||
tsvg += '</g>'; | tsvg += '</g>'; | ||
tsvg += '<path class="ttemp" d="M51.8,69.7V' + a1.toString() + '.3c0-2.1-1.7-3.8-3.8-3.8c-2.1,0-3.8,1.7-3.8,3.8v' + a2.toString() + '.4c-4.7,1.6-8.1,6-8.1,11.3c0,6.6,5.3,11.9,11.9,11.9C54.6,92.9,60,87.5,60,81C60,75.7,56.6,71.2,51.8,69.7z"/>'; | tsvg += '<path class="ttemp" d="M51.8,69.7V' + a1.toString() + '.3c0-2.1-1.7-3.8-3.8-3.8c-2.1,0-3.8,1.7-3.8,3.8v' + a2.toString() + '.4c-4.7,1.6-8.1,6-8.1,11.3c0,6.6,5.3,11.9,11.9,11.9C54.6,92.9,60,87.5,60,81C60,75.7,56.6,71.2,51.8,69.7z"/>'; | ||
tsvg += '<path class="toutline" d="M56.4,65.5V9.9c0-4.6-3.7-8.4-8.4-8.4h0c-4.6,0-8.4,3.7-8.4,8.4v55.7c-5.5,3-9.2,8.8-9.2,15.4c0,9.7,7.9,17.5,17.5,17.5c9.7,0,17.5-7.9,17.5-17.5C65.6,74.3,61.9,68.5,56.4,65.5z"/>'; | tsvg += '<path class="toutline" d="M56.4,65.5V9.9c0-4.6-3.7-8.4-8.4-8.4h0c-4.6,0-8.4,3.7-8.4,8.4v55.7c-5.5,3-9.2,8.8-9.2,15.4c0,9.7,7.9,17.5,17.5,17.5c9.7,0,17.5-7.9,17.5-17.5C65.6,74.3,61.9,68.5,56.4,65.5z"/>'; | ||


