Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 398: | Rivi 398: | ||
obs.xvalue = obs.seasonmiddle; | obs.xvalue = obs.seasonmiddle; | ||
obs.yvalue = obs.compareDate; | obs.yvalue = obs.compareDate; | ||
obs.value = obs.obsdatetime.toLocaleDateString( memo.lang ); | |||
obs.tooltip = '<p><b>' + i18n[ 'season' ][ 'winter' ][ memo.lang ] + ' ' + obs.season + '–' + (obs.season+1) + '</b></p>'; | obs.tooltip = '<p><b>' + i18n[ 'season' ][ 'winter' ][ memo.lang ] + ' ' + obs.season + '–' + (obs.season+1) + '</b></p>'; | ||
obs.tooltip += '<p>' + i18n[ s ].title2[ memo.lang ] + ': ' + obs.obsdatetime.toLocaleDateString( memo.lang ) + '</p>'; | obs.tooltip += '<p>' + i18n[ s ].title2[ memo.lang ] + ': ' + obs.obsdatetime.toLocaleDateString( memo.lang ) + '</p>'; | ||
| Rivi 411: | Rivi 412: | ||
if ( typeof memo.obsesS[ obs.season ] == 'undefined' ) { | if ( typeof memo.obsesS[ obs.season ] == 'undefined' ) { | ||
memo.obsesS[ obs.season ] = {}; | memo.obsesS[ obs.season ] = { 'maintainer': obs.maintainer }; | ||
} | } | ||
if ( obs.data.cat == '2' ) { | if ( obs.data.cat == '2' ) { | ||
memo.obsesS[ obs.season ][ 'low' ] = obs.compareDate; | memo.obsesS[ obs.season ][ 'low' ] = obs.compareDate; | ||
} else if ( obs.data.cat == '5' ) { | } else if ( obs.data.cat == '5' ) { | ||
memo.obsesS[ obs.season ][ 'high' ] = obs.compareDate; | memo.obsesS[ obs.season ][ 'high' ] = obs.compareDate; | ||
} | } | ||
if ( memo.obsesS[ obs.season ][ 'maintainer' ] != obs.maintainer ) { memo.obsesS[ obs.season ][ 'maintainer' ] = ''; } | |||
if ( typeof memo.obsesS[ obs.season ][ 'low' ] != 'undefined' && typeof memo.obsesS[ obs.season ][ 'high' ] != 'undefined' ) { | if ( typeof memo.obsesS[ obs.season ][ 'low' ] != 'undefined' && typeof memo.obsesS[ obs.season ][ 'high' ] != 'undefined' ) { | ||
days = Math.round( ( memo.obsesS[ obs.season ][ 'high' ].getTime() - memo.obsesS[ obs.season ][ 'low' ].getTime() ) / ( 1000*60*60*24 ) ); | |||
if ( typeof memo.seriesO[ 'ice_cat_2,5' ] == 'undefined' ) { | if ( typeof memo.seriesO[ 'ice_cat_2,5' ] == 'undefined' ) { | ||
memo.seriesO[ 'ice_cat_2,5' ] = { 'id': 'ice_cat_2,5', 'order': 10, 'title': i18n[ 'ice_cat_2,5' ].title[ memo.lang ], 'type': 'candlestick', 'color': i18n[ 'ice_cat_2,5' ].color, obses: [] }; | memo.seriesO[ 'ice_cat_2,5' ] = { 'id': 'ice_cat_2,5', 'order': 10, 'title': i18n[ 'ice_cat_2,5' ].title[ memo.lang ], 'type': 'candlestick', 'color': i18n[ 'ice_cat_2,5' ].color, obses: [] }; | ||
} | } | ||
memo.seriesO[ 'ice_cat_2,5' ].obses.push( { 'obsdatetime': obs.obsdatetime, 'season': obs.season, ' | memo.seriesO[ 'ice_cat_2,5' ].obses.push( { 'obsdatetime': obs.obsdatetime, 'season': obs.season, 'value': days + ' ' + i18n[ 'days' ][ memo.lang ], 'addInfo': '', 'maintainer': memo.obsesS[ obs.season ][ 'maintainer' ], 'xvalue': obs.seasonmiddle, 'low': memo.obsesS[ obs.season ][ 'low' ], 'high': memo.obsesS[ obs.season ][ 'high' ], 'tooltip': '<p><b>' + i18n[ 'season' ][ 'winter' ][ memo.lang ] + ' ' + obs.season + '–' + (obs.season+1) + '</b></p><p>' + i18n[ 'ice_cat_2,5' ].title[ memo.lang ] + ': ' + days + ' ' + i18n[ 'days' ][ memo.lang ] + '</p>' } ); | ||
} | } | ||
} | } | ||
} | } | ||
| Rivi 1 125: | Rivi 1 129: | ||
obs = memo.seriesA[ s ].obses[ o ]; | obs = memo.seriesA[ s ].obses[ o ]; | ||
csv += '\r\n'; | csv += '\r\n'; | ||
| Rivi 1 132: | Rivi 1 136: | ||
csv += ';' + i18n[ memo.seriesA[ s ].id ].title[ memo.lang ]; | csv += ';' + i18n[ memo.seriesA[ s ].id ].title[ memo.lang ]; | ||
csv += ';' + obs. | csv += ';' + obs.value; | ||
csv += ';' + obs.addInfo; | csv += ';' + obs.addInfo; | ||


