Ero sivun ”Widget:XJwCharts” versioiden välillä
Järvi-meriwikistä
Rivi 108: | Rivi 108: | ||
for ( var y=firstW; y<(lastW+1); y++ ) { | for ( var y=firstW; y<(lastW+1); y++ ) { | ||
− | + | ||
+ | var wn = 'Talvi ' + y.toString() + '-' + (y+1).toString(); | ||
+ | |||
if ( typeof data[y] != 'undefined' ) { | if ( typeof data[y] != 'undefined' ) { | ||
+ | |||
+ | row = [ y ]; | ||
+ | |||
if ( typeof data[y].freeze != 'undefined' && typeof data[y].breakup != 'undefined' ) { | if ( typeof data[y].freeze != 'undefined' && typeof data[y].breakup != 'undefined' ) { | ||
icedays = Math.round( ( data[y].breakup.getTime() - data[y].freeze.getTime() ) / ( 1000*60*60*24 ) ); | icedays = Math.round( ( data[y].breakup.getTime() - data[y].freeze.getTime() ) / ( 1000*60*60*24 ) ); | ||
− | row | + | row.push( data[y].freeze ); row.push( data[y].freeze ); |
+ | row.push( data[y].breakup ); row.push( data[y].breakup ); | ||
+ | row.push( '<b>' + wn + '</b><br />Jääpeiteaika: ' + icedays + ' päivää' ); | ||
} else { | } else { | ||
− | + | row.push( null ); row.push( null ); | |
− | + | row.push( null ); row.push( null ); | |
− | + | row.push( null ); | |
− | |||
− | |||
} | } | ||
+ | |||
+ | if ( typeof data[y].freeze != 'undefined' ) { | ||
+ | row.push( data[y].freeze =; | ||
+ | row.push( '<b>' + wn + '</b><br />Jääpeitekausi alkoi' ); | ||
+ | } else { | ||
+ | row.push( null ); row.push( null ); | ||
+ | } | ||
+ | |||
+ | if ( typeof data[y].breakup != 'undefined' ) { | ||
+ | row.push( data[y].breakup =; | ||
+ | row.push( '<b>' + wn + '</b><br />Jäätön kausi alkoi' ); | ||
+ | } else { | ||
+ | row.push( null ); row.push( null ); | ||
+ | } | ||
+ | |||
} else { | } else { | ||
− | row = [ y, null, null, null, null, null, null, null ]; | + | row = [ y, null, null, null, null, null, null, null, null, null ]; |
} | } | ||
Rivi 134: | Rivi 154: | ||
memo.dataTable.addColumn( 'date', 'Ice break-up' ); | memo.dataTable.addColumn( 'date', 'Ice break-up' ); | ||
memo.dataTable.addColumn( 'date', 'Ice break-up' ); | memo.dataTable.addColumn( 'date', 'Ice break-up' ); | ||
+ | memo.dataTable.addColumn({ role: 'tooltip', 'p': { 'html': true } }); | ||
+ | memo.dataTable.addColumn( 'date', 'Freezing' ); | ||
memo.dataTable.addColumn({ role: 'tooltip', 'p': { 'html': true } }); | memo.dataTable.addColumn({ role: 'tooltip', 'p': { 'html': true } }); | ||
memo.dataTable.addColumn( 'date', 'Ice-break-up' ); | memo.dataTable.addColumn( 'date', 'Ice-break-up' ); |