Ero sivun ”Widget:XJwCharts” versioiden välillä
Järvi-meriwikistä
Rivi 109: | Rivi 109: | ||
for ( var y=firstW; y<(lastW+1); y++ ) { | for ( var y=firstW; y<(lastW+1); y++ ) { | ||
− | if ( typeof data[y] != 'undefined' | + | if ( typeof data[y] != '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 ) ); | |
− | + | row = [ y, data[y].freeze, data[y].freeze, data[y].breakup, data[y].breakup, '<b>Talvi ' + y.toString() + '-' + (y+1).toString() + '</b><br />Jääpeiteaika: ' + icedays + ' päivää' ]; | |
+ | } else { | ||
+ | if ( typeof data[y].freeze != 'undefined' ) { | ||
+ | row = [ y, null, null, null, null, null, data[y].freeze ]; | ||
+ | } else { | ||
+ | row = [ y, null, null, null, null, null, data[y].breakup ]; | ||
+ | } | ||
+ | } | ||
} else { | } else { | ||
− | row = [ y, null, null, null, null, | + | row = [ y, null, null, null, null, null, null ]; |
} | } | ||
Rivi 128: | Rivi 135: | ||
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({ role: 'tooltip', 'p': { 'html': true } }); | ||
+ | memo.dataTable.addColumn( 'date', 'Ice-break-up' ); | ||
memo.dataTable.addRows( table ); | memo.dataTable.addRows( table ); | ||
Rivi 135: | Rivi 143: | ||
memo.options = { | memo.options = { | ||
+ | seriesType: "candlesticks", | ||
+ | series: { | ||
+ | 1: { type: "scatter" } | ||
+ | } | ||
legend: 'none', | legend: 'none', | ||
candlestick: { | candlestick: { |