Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 738: | Rivi 738: | ||
tstr += '<br /><span>(' + memo.obsesA[0].obsdatetime.inRelationToToday(memo.lang).toLowerCase() + ')</span>'; | tstr += '<br /><span>(' + memo.obsesA[0].obsdatetime.inRelationToToday(memo.lang).toLowerCase() + ')</span>'; | ||
} | } | ||
+ | up = Math.round( (tavg/33)*50 ); | ||
+ | up = Math.max( up, 0 ); | ||
+ | up = Math.min( up, 50 ); | ||
+ | |||
+ | a1 = 60 - up; | ||
+ | a2 = 9 + up; | ||
} else { | } else { | ||
tavg = -1; | tavg = -1; | ||
tstr = 'Ei tuoreita havaintoja'; | tstr = 'Ei tuoreita havaintoja'; | ||
+ | a1 = 60 - 25; | ||
+ | a2 = 9 + 25; | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Rivi 762: | Rivi 763: | ||
if ( tavg < 10 ) { fill = '#0076b0'; } | if ( tavg < 10 ) { fill = '#0076b0'; } | ||
else if ( tavg < 20 ) { fill = '#d5da26'; } | else if ( tavg < 20 ) { fill = '#d5da26'; } | ||
+ | else if ( tavg < 0 ) { fill ='#ccc'; } | ||
else { fill = '#da2626'; } | else { fill = '#da2626'; } | ||