Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 86: | Rivi 86: | ||
memo.caption = jQuery( this ).attr( 'data-caption' ); if ( typeof memo.caption == 'undefined' ) { memo.caption = ""; } | memo.caption = jQuery( this ).attr( 'data-caption' ); if ( typeof memo.caption == 'undefined' ) { memo.caption = ""; } | ||
if ( typeof jQuery( this ).attr( 'data-jw-summerwinter' ) != 'undefined' ) { memo.summerwinter = ( jQuery( this ).attr( 'data-jw-summerwinter' ) == 'true' ); } else { memo.summerwinter = false; }; | if ( typeof jQuery( this ).attr( 'data-jw-summerwinter' ) != 'undefined' ) { memo.summerwinter = ( jQuery( this ).attr( 'data-jw-summerwinter' ) == 'true' ); } else { memo.summerwinter = false; }; | ||
if ( typeof jQuery( this ).attr( 'data-jw-bottomsurface' ) != 'undefined' ) { memo.bottomsurface = ( jQuery( this ).attr( 'data-jw-bottomsurface' ) == 'true' ); } else { memo.bottomsurface = false; }; | |||
if ( typeof jQuery( this ).attr( 'data-jw-divide' ) != 'undefined' ) { | |||
memo.divide = jQuery( this ).attr( 'data-jw-divide' ); | |||
} else if ( memo.bottomsurface ) { | |||
memo.divide = 'bottomsurface'; | |||
} else if ( memo.summerwinter ) { | |||
memo.divide = 'summerwinter'; | |||
} else { | |||
memo.divide = '-'; | |||
}; | |||
if ( typeof jQuery( this ).attr( 'data-showlink' ) == 'undefined' ) { | if ( typeof jQuery( this ).attr( 'data-showlink' ) == 'undefined' ) { | ||
| Rivi 528: | Rivi 539: | ||
// add series id | // add series id | ||
if ( memo.graphType == 'trend' ) { | if ( memo.graphType == 'trend' ) { | ||
if ( memo. | if ( memo.divide == 'summerwinter' ) { | ||
if ( obs.compareDate.getMonth() > 4 && obs.compareDate.getMonth() < 9 ) { | if ( obs.compareDate.getMonth() > 4 && obs.compareDate.getMonth() < 9 ) { | ||
obs.seriesId = 'summer'; | obs.seriesId = 'summer'; | ||
| Rivi 541: | Rivi 547: | ||
obs.seriesId = 'other'; | obs.seriesId = 'other'; | ||
} | } | ||
} else if ( memo.divide == 'bottomsurface' ) { | |||
console.log( obs ); | |||
if ( obs.data ) { | |||
obs.seriesId = 'bottom'; | |||
} else if ( obs.data ) { | |||
obs.seriesId = 'surface'; | |||
} else { | |||
obs.seriesId = 'other'; | |||
} | |||
} else { | } else { | ||
obs.seriesId = 0; | obs.seriesId = 0; | ||
| Rivi 1 060: | Rivi 1 074: | ||
memo.axisMaxDate.setDate(31); | memo.axisMaxDate.setDate(31); | ||
if ( memo.summerwinter ) { | if ( memo.divide == 'summerwinter' ) { | ||
memo.options.series[0] = { type: 'scatter', pointSize: 10, color: colors[ 'spring-autumn' ] }; | memo.options.series[0] = { type: 'scatter', pointSize: 10, color: colors[ 'spring-autumn' ] }; | ||
| Rivi 1 095: | Rivi 1 109: | ||
if ( memo.showTrend ) { | if ( memo.showTrend ) { | ||
if ( memo.summerwinter ) { | if ( memo.divide == 'summerwinter' ) { | ||
memo.options.trendlines[0] = { 'lineWidth': 0, 'opacity': 0, tooltip: false, visibleInLegend: false }; | memo.options.trendlines[0] = { 'lineWidth': 0, 'opacity': 0, tooltip: false, visibleInLegend: false }; | ||
memo.options.trendlines[1] = { labelInLegend: i18n['trendline'][memo.lang], tooltip: false, color: colors['summer'], lineWidth: 3, originalLineWidth: 3, opacity: 1, type: memo.trendType, 'degree': 2, visibleInLegend: false }; | memo.options.trendlines[1] = { labelInLegend: i18n['trendline'][memo.lang], tooltip: false, color: colors['summer'], lineWidth: 3, originalLineWidth: 3, opacity: 1, type: memo.trendType, 'degree': 2, visibleInLegend: false }; | ||
| Rivi 1 120: | Rivi 1 134: | ||
for (var o in memo.obsesA) { | for (var o in memo.obsesA) { | ||
if ( memo.summerwinter ) { | if ( memo.divide == 'summerwinter' ) { | ||
if ( memo.obsesA[o].seriesId == 'summer' ) { | if ( memo.obsesA[o].seriesId == 'summer' ) { | ||
memo.dataA.push( [ memo.obsesA[o].obsdatetime, null, null, null, null, memo.obsesA[o].value, memo.obsesA[o].style, null, memo.obsesA[o].popup, null, null, null, null ] ); | memo.dataA.push( [ memo.obsesA[o].obsdatetime, null, null, null, null, memo.obsesA[o].value, memo.obsesA[o].style, null, memo.obsesA[o].popup, null, null, null, null ] ); | ||


