Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 746: | Rivi 746: | ||
} else { | } else { | ||
tavg = -1; | tavg = -1; | ||
− | tstr = 'Ei tuoreita havaintoja'; | + | tstr = 'Ei tuoreita<br />havaintoja'; |
a1 = 60 - 25; | a1 = 60 - 25; | ||
a2 = 9 + 25; | a2 = 9 + 25; | ||
Rivi 1 193: | Rivi 1 193: | ||
// series for average | // series for average | ||
memo.data.addColumn( 'number', i18n['average'][memo.lang] ); | memo.data.addColumn( 'number', i18n['average'][memo.lang] ); | ||
− | |||
if ( i18n[memo.obscode].trend.layout == 'area') { | if ( i18n[memo.obscode].trend.layout == 'area') { | ||
memo.options.series[sc++] = { type: 'area', curveType: 'function', lineWidth: 2, pointSize: 0, color: colors['average'], areaOpacity: 0.25, lineDashStyle: [2,2], enableInteractivity: false, visibleInLegend: memo.trendType=='moving' }; | memo.options.series[sc++] = { type: 'area', curveType: 'function', lineWidth: 2, pointSize: 0, color: colors['average'], areaOpacity: 0.25, lineDashStyle: [2,2], enableInteractivity: false, visibleInLegend: memo.trendType=='moving' }; | ||
Rivi 1 199: | Rivi 1 198: | ||
memo.options.series[sc++] = { type: 'line', curveType: 'function', lineWidth: 3, pointSize: 5, color: colors['average'], dataOpacity: 0.75, lineDashStyle: [6,3], enableInteractivity: false, visibleInLegend: memo.trendType=='moving' }; | memo.options.series[sc++] = { type: 'line', curveType: 'function', lineWidth: 3, pointSize: 5, color: colors['average'], dataOpacity: 0.75, lineDashStyle: [6,3], enableInteractivity: false, visibleInLegend: memo.trendType=='moving' }; | ||
} | } | ||
+ | console.log( memo.seasonsO ); | ||
+ | console.log( memo.seasonsA ); | ||
+ | |||
memo.data.addColumn( { id: 'dev', type: 'number', role: 'interval' } ); | memo.data.addColumn( { id: 'dev', type: 'number', role: 'interval' } ); | ||
Rivi 1 242: | Rivi 1 244: | ||
} | } | ||
} | } | ||
− | + | ||
− | |||
− | |||
// calculate standard deviation | // calculate standard deviation | ||
devSum = 0; | devSum = 0; | ||
Rivi 1 281: | Rivi 1 281: | ||
memo.avgWlist.sort( function(a, b) { return (a.y*100+a.w) - (b.y*100+b.w); }); | memo.avgWlist.sort( function(a, b) { return (a.y*100+a.w) - (b.y*100+b.w); }); | ||
− | |||
− | |||
firstY = memo.avgWlist[0].y; | firstY = memo.avgWlist[0].y; | ||
Rivi 1 413: | Rivi 1 411: | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
dataRow[cc-4] = memo.avgMsmooth[i]; | dataRow[cc-4] = memo.avgMsmooth[i]; | ||
Rivi 1 479: | Rivi 1 473: | ||
} | } | ||
− | |||
− | |||
// make ticks for x axis | // make ticks for x axis | ||
Rivi 1 497: | Rivi 1 489: | ||
memo.options.hAxis.viewWindow.max = memo.axisMaxDate; | memo.options.hAxis.viewWindow.max = memo.axisMaxDate; | ||
memo.options.hAxis.ticks = []; | memo.options.hAxis.ticks = []; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
for (i=0; i<mCount; i++) { | for (i=0; i<mCount; i++) { |