Ero sivun ”Widget:Test4” versioiden välillä
Järvi-meriwikistä
Rivi 706: | Rivi 706: | ||
devC = 0; | devC = 0; | ||
devMax = 0; | devMax = 0; | ||
− | for ( var | + | for ( var w=0; w<memo.avgWA.length; w++ ) { |
− | + | devC++; | |
− | + | devx = 0; | |
− | + | for (var vi in memo.avgWA[w].values ) { | |
− | + | devx += Math.pow( (memo.avgWA[w].values[vi] - memo.avgWA[w].avg), 2 ); | |
− | devx += Math.pow( (memo. | ||
} | } | ||
− | memo. | + | memo.avgWA[w].dev = Math.sqrt( devx/memo.avgWA[w].count ); |
− | devSum += memo. | + | devSum += memo.avgWA[w].dev; |
− | devMax = Math.max( memo. | + | devMax = Math.max( memo.avgWA[w].dev, devMax ); |
} | } | ||
} | } | ||
+ | |||
+ | console.log( memo.avgWA ); | ||
memo.seriesA.push( { 'type': 'area', 'title': 'Running', 'color': colors.average, 'size': 0, 'line': 2.33, 'legend': true, 'trendline': 'none', obses: [] } ); | memo.seriesA.push( { 'type': 'area', 'title': 'Running', 'color': colors.average, 'size': 0, 'line': 2.33, 'legend': true, 'trendline': 'none', obses: [] } ); |