Ero sivun ”Widget:Test4” versioiden välillä
Järvi-meriwikistä
(5 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 675: | Rivi 675: | ||
memo.avgWA = []; | memo.avgWA = []; | ||
if ( memo.season == 'summer' ) { | if ( memo.season == 'summer' ) { | ||
− | for ( var w=1; w<54; | + | for ( var w=1; w<54; w++ ) { |
if ( typeof memo.avgW[ w ] != 'undefined' ) { memo.avgWA.push( memo.avgW[ w ] ); } | if ( typeof memo.avgW[ w ] != 'undefined' ) { memo.avgWA.push( memo.avgW[ w ] ); } | ||
} | } | ||
Rivi 755: | Rivi 755: | ||
'y': memo.avgWA[ w ].hmas, | 'y': memo.avgWA[ w ].hmas, | ||
'style': null, | 'style': null, | ||
− | 'tooltip': '', | + | 'tooltip': i18n[ 'moving' ][ memo.lang ], |
'annotation': null | 'annotation': null | ||
}); | }); | ||
− | } | + | } |
− | /* | + | |
+ | /* | ||
memo.seriesA.push( { 'type': 'scatter', 'title': 'Hull', 'highlight': false, 'color': 'green', 'size': 0, 'line': 2.33, 'legend': true, 'trendline': 'none', obses: [] } ); | memo.seriesA.push( { 'type': 'scatter', 'title': 'Hull', 'highlight': false, 'color': 'green', 'size': 0, 'line': 2.33, 'legend': true, 'trendline': 'none', obses: [] } ); | ||
for ( var w in memo.avgWA ) { | for ( var w in memo.avgWA ) { | ||
Rivi 768: | Rivi 769: | ||
'y': memo.avgWA[ w ].hmas, | 'y': memo.avgWA[ w ].hmas, | ||
'style': null, | 'style': null, | ||
− | 'tooltip': '', | + | 'tooltip': i18n[ 'moving' ][ memo.lang ], |
'annotation': null | 'annotation': null | ||
}); | }); | ||
Rivi 850: | Rivi 851: | ||
} | } | ||
− | } | + | } |
+ | |||
+ | console.log( memo.dataA ); | ||
// make ticks for x axis | // make ticks for x axis | ||
Rivi 888: | Rivi 891: | ||
} | } | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
drawChart(memo); | drawChart(memo); | ||
Rivi 1 052: | Rivi 1 007: | ||
if ( i18n[memo.obscode].type == 'num' ) { | if ( i18n[memo.obscode].type == 'num' ) { | ||
+ | |||
+ | headerCols.push( i18n[ 'Date' ][ memo.lang ] ); | ||
+ | headerCols.push( i18n[ 'Time' ][ memo.lang ] ); | ||
+ | headerCols.push( i18n[ 'Observation' ][ memo.lang ] ); | ||
+ | headerCols.push( i18n[ 'Value' ][ memo.lang ] ); | ||
+ | headerCols.push( i18n[ 'ValueUnit' ][ memo.lang ] ); | ||
+ | headerCols.push( i18n[ 'Additionalinfo' ][ memo.lang ] ); | ||
+ | headerCols.push( i18n[ 'Image' ][ memo.lang ] ); | ||
+ | headerCols.push( i18n[ 'ObserverStatus' ][ memo.lang ] ); | ||
− | + | header += headerCols.join( ';' ); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | header += headerCols.join( | ||
for ( var o in memo.obses ) { | for ( var o in memo.obses ) { | ||
Rivi 1 066: | Rivi 1 023: | ||
csvCols = []; | csvCols = []; | ||
− | csvCols.push( memo.obses[o].obsdatetime. | + | csvCols.push( memo.obses[o].obsdatetime.toLocaleDateString( memo.lang ) ); |
− | + | csvCols.push( memo.obses[o].obsdatetime.toLocaleTimeString( memo.lang ) ); | |
− | + | ||
− | + | //csvCols.push( memo.obses[o].obsdatetime.getFullYear() + '-' + ( memo.obses[o].obsdatetime.getMonth() + 1 ) + '-' + memo.obses[o].obsdatetime.getDate() ); | |
− | |||
− | |||
− | |||
+ | //if ( memo.obses[o].obsdatetime.getUTCHours() == 0 && memo.obses[o].obsdatetime.getUTCMinutes() == 0 && memo.obses[o].obsdatetime.getUTCSeconds() == 0 ) { | ||
+ | // csvCols.push( '' ); | ||
+ | //} else { | ||
+ | // csvCols.push( ( "0" + memo.obses[o].obsdatetime.getUTCHours() ).slice(-2) + ':' + ( "0" + memo.obses[o].obsdatetime.getUTCMinutes() ).slice(-2) ); | ||
+ | //} | ||
+ | csvCols.push( i18n[ memo ].title[memo.lang ] ); | ||
csvCols.push( '"' + memo.obses[o].value.toString().replace( '.', i18n['dec'][memo.lang] ) + '"' ); | csvCols.push( '"' + memo.obses[o].value.toString().replace( '.', i18n['dec'][memo.lang] ) + '"' ); | ||
csvCols.push( memo.obses[o].addInfo ); | csvCols.push( memo.obses[o].addInfo ); | ||
Rivi 1 320: | Rivi 1 280: | ||
'title': { 'fi': 'Pintaveden lämpötila', 'en': 'Surface water termperature', 'sv': 'Ytvattentemperatur', 'ru': '???' }, | 'title': { 'fi': 'Pintaveden lämpötila', 'en': 'Surface water termperature', 'sv': 'Ytvattentemperatur', 'ru': '???' }, | ||
'unit': '°C', | 'unit': '°C', | ||
− | 'axisTitleV': { 'fi': 'Lämpötila, °C', 'en': 'Temperature, °C', 'sv': 'Temperatur, °C', 'ru': '°C' } | + | 'axisTitleV': { 'fi': 'Lämpötila, °C', 'en': 'Temperature, °C', 'sv': 'Temperatur, °C', 'ru': '°C' }, |
+ | 'changes': { | ||
+ | 'fi': 'Pintaveden lämpötilan kuvio on uudistunut.', | ||
+ | 'en': 'The surface water temperature graph has been renewed.', | ||
+ | 'sv': 'Ytvattentemperaturdiagrammet har förnyats.', | ||
+ | 'ru': '' | ||
+ | } | ||
}, | }, | ||
'ice': { | 'ice': { | ||
Rivi 1 333: | Rivi 1 299: | ||
'axisTitleV': { 'fi': 'Jääpeite, cm', 'en': 'Ice cover, cm', 'sv': 'Istäcket, cm', 'ru': 'm' }, | 'axisTitleV': { 'fi': 'Jääpeite, cm', 'en': 'Ice cover, cm', 'sv': 'Istäcket, cm', 'ru': 'm' }, | ||
'changes': { | 'changes': { | ||
− | 'fi': 'Jääpeitteen | + | 'fi': 'Jääpeitteen paksuudesta kertova kuvio on uudistunut. Nyt voit esimerkiksi korostaa kuviosta tietyn vuoden kehityksen valitsemalla yksittäisen havainnon.', |
− | 'en': '', | + | 'en': 'The chart showing the thickness of the ice sheet has been renewed. For example, you can now highlight a particular year in the chart by selecting a single observation.', |
− | 'sv': '', | + | 'sv': 'Diagrammet som visar isens tjocklek har förnyats. Till exempel kan du nu markera ett visst år i diagrammet genom att välja en enskild observation.', |
'ru': '' | 'ru': '' | ||
} | } | ||
Rivi 1 398: | Rivi 1 364: | ||
'ObserverStatus': { 'fi': 'Havainnoijan status', 'en': 'Observer status', 'sv': 'Observatörens status', 'ru': '???' }, | 'ObserverStatus': { 'fi': 'Havainnoijan status', 'en': 'Observer status', 'sv': 'Observatörens status', 'ru': '???' }, | ||
'average': { 'fi': 'Keskimäärin', 'en': 'Average', 'sv': 'Genomsnitt', 'ru': '???' }, | 'average': { 'fi': 'Keskimäärin', 'en': 'Average', 'sv': 'Genomsnitt', 'ru': '???' }, | ||
+ | 'moving': { 'fi': 'Liukuva keskiarvo', 'en': 'Moving average', 'sv': 'Glidande medelvärde', 'ru': '???' }, | ||
'trendline': { 'fi': 'Trendiviiva', 'en': 'Trend line', 'sv': 'Trendlinje', 'ru': '???' }, | 'trendline': { 'fi': 'Trendiviiva', 'en': 'Trend line', 'sv': 'Trendlinje', 'ru': '???' }, | ||
'days': { 'fi': 'päivää', 'en': 'days', 'sv': 'dygn', 'ru': '???' }, | 'days': { 'fi': 'päivää', 'en': 'days', 'sv': 'dygn', 'ru': '???' }, |