Ero sivun ”Widget:XJwCharts” versioiden välillä
Järvi-meriwikistä
Rivi 122: | Rivi 122: | ||
memo.obsMaxValue = Math.max( memo.obsMaxValue, obs.value ); | memo.obsMaxValue = Math.max( memo.obsMaxValue, obs.value ); | ||
− | memo.obsMinDateMs = Math.min( memo.obsMinDateMs, obs. | + | memo.obsMinDateMs = Math.min( memo.obsMinDateMs, obs.obsdatetime.getTime() ); |
− | memo.obsMaxDateMs = Math.max( memo.obsMaxDateMs, obs. | + | memo.obsMaxDateMs = Math.max( memo.obsMaxDateMs, obs.obsdatetime.getTime() ); |
// add compare date to obses | // add compare date to obses | ||
− | if ( memo.season == 'summer' || obs. | + | if ( memo.season == 'summer' || obs.obsdatetime.getMonth() > 7 ) { |
− | obs.compareDate = new Date( memo.curSeason, obs. | + | obs.compareDate = new Date( memo.curSeason, obs.obsdatetime.getMonth(), obs.obsdatetime.getDate() ); |
} else { | } else { | ||
− | obs.compareDate = new Date( memo.curSeason+1, obs. | + | obs.compareDate = new Date( memo.curSeason+1, obs.obsdatetime.getMonth(), obs.obsdatetime.getDate() ); |
} | } | ||
ms = obs.compareDate.getTime(); | ms = obs.compareDate.getTime(); | ||
Rivi 138: | Rivi 138: | ||
if ( memo.graphType == 'trend' ) { | if ( memo.graphType == 'trend' ) { | ||
obs.seriesId = 0; | obs.seriesId = 0; | ||
− | } else if ( memo.season == 'summer' || obs. | + | } else if ( memo.season == 'summer' || obs.obsdatetime.getMonth() > 7 ) { |
− | obs.seriesId = obs. | + | obs.seriesId = obs.obsdatetime.getFullYear(); |
} else { | } else { | ||
− | obs.seriesId = obs. | + | obs.seriesId = obs.obsdatetime.getFullYear()-1; |
} | } | ||
Rivi 156: | Rivi 156: | ||
} | } | ||
− | obs.popup += '(' + obs. | + | obs.popup += '(' + obs.obsdatetime.inRelationToToday(memo.lang) + ')'; |
obs.popup += '</div>'; | obs.popup += '</div>'; | ||