Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 47: | Rivi 47: | ||
memo.obscode = jQuery( this ).attr( 'data-jw-obscode' ); | memo.obscode = jQuery( this ).attr( 'data-jw-obscode' ); | ||
memo.obscodeParts = memo.obscode.split('_'); | memo.obscodeParts = memo.obscode.split('_'); | ||
− | memo.startyear = | + | memo.startyear = jQuery( this ).attr( 'data-start-year' ); if ( typeof memo.startyear == 'undefined' ) { memo.startyear = '0000'; } |
− | |||
− | |||
memo.service = jQuery( this ).attr( 'data-coo311-service_code' ); | memo.service = jQuery( this ).attr( 'data-coo311-service_code' ); | ||
memo.graphType = jQuery( this ).attr( 'data-graph-type' ); | memo.graphType = jQuery( this ).attr( 'data-graph-type' ); | ||
Rivi 119: | Rivi 117: | ||
} | } | ||
− | memo.jw.loadObses( { 'obscode': memo.obscodeParts[0], 'siteid': memo.siteid, 'custom': custom }, function( o ) { | + | memo.jw.loadObses( { 'obscode': memo.obscodeParts[0], 'siteid': memo.siteid, 'startdate': memo.startyear + '-01-01', 'custom': custom }, function( o ) { |
memo.obses = memo.jw.obs; | memo.obses = memo.jw.obs; | ||
drawVisualization(memo); | drawVisualization(memo); |