Ero sivun ”Widget:JwCurrentCharts” versioiden välillä
Järvi-meriwikistä
Rivi 579: | Rivi 579: | ||
for ( var o in memo.obsesA ) { | for ( var o in memo.obsesA ) { | ||
+ | |||
obs = memo.obsesA[o]; | obs = memo.obsesA[o]; | ||
iw = ( 7 - Math.round( ( today.getTime() - memo.obsesA[o].obsdatetime.getTime() ) / ( 24*60*60*1000 ) ) ); | iw = ( 7 - Math.round( ( today.getTime() - memo.obsesA[o].obsdatetime.getTime() ) / ( 24*60*60*1000 ) ) ); | ||
Rivi 588: | Rivi 589: | ||
icat = 1; | icat = 1; | ||
} | } | ||
+ | console.log( obs.data.val ); | ||
icatsum += icat * iw; | icatsum += icat * iw; | ||
Rivi 596: | Rivi 598: | ||
if ( icount > 0 ) { | if ( icount > 0 ) { | ||
+ | |||
iavg = ( icatsum/icatcount ); | iavg = ( icatsum/icatcount ); | ||