Ero sivun ”Widget:JwObsCharts2” versioiden välillä
Järvi-meriwikistä
Rivi 332: | Rivi 332: | ||
//memo.jwR = new jwApi(); | //memo.jwR = new jwApi(); | ||
− | + | var so = { 'startdate': memo.startDate, 'custom': '' }; | |
− | var so = { 'custom': '' }; | + | //var so = { 'custom': '' }; |
if ( typeof memo.obscodeParts[1] != 'undefined' ) { | if ( typeof memo.obscodeParts[1] != 'undefined' ) { | ||
Rivi 342: | Rivi 342: | ||
} | } | ||
} | } | ||
− | + | ||
− | |||
if ( memo.refcode == '-' ) { | if ( memo.refcode == '-' ) { | ||
so.obscode = memo.obscodeParts[0]; | so.obscode = memo.obscodeParts[0]; | ||
Rivi 356: | Rivi 355: | ||
} | } | ||
− | so.sort = 'Week'; | + | //so.sort = 'Week'; |
− | |||
//console.log(so); | //console.log(so); | ||
memo.jw.loadObses( so, function( o ) { | memo.jw.loadObses( so, function( o ) { | ||
− | console.log( JSON.stringify( memo.jw.obs ) ); | + | //console.log( JSON.stringify( memo.jw.obs ) ); |
memo.obses = memo.jw.obs; | memo.obses = memo.jw.obs; | ||
drawVisualization(memo); | drawVisualization(memo); | ||
Rivi 451: | Rivi 449: | ||
// create data | // create data | ||
obs.data = JSON.parse( obs.printouts.DataJSON ); | obs.data = JSON.parse( obs.printouts.DataJSON ); | ||
+ | console.log( JSON.stringify( obs.data ) ); | ||
if ( obs.data.unit == 'cm' && i18n[memo.obscode]['unit'] == 'm' ) { | if ( obs.data.unit == 'cm' && i18n[memo.obscode]['unit'] == 'm' ) { |