Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 999: | Rivi 999: | ||
} | } | ||
function addDataToTrendChart(memo) { | function addDataToTrendChart(memo) { | ||
console.log( memo.trendType ); | |||
// do axis min and max | // do axis min and max | ||
| Rivi 1 008: | Rivi 1 010: | ||
memo.axisMinDate.setDate(1); | memo.axisMinDate.setDate(1); | ||
memo.axisMaxDate.setDate(31); | memo.axisMaxDate.setDate(31); | ||
if ( memo.summerwinter ) { | if ( memo.summerwinter ) { | ||
| Rivi 1 018: | Rivi 1 020: | ||
memo.data.addColumn( { type: 'string', role: 'annotation' } ); | memo.data.addColumn( { type: 'string', role: 'annotation' } ); | ||
memo.data.addColumn( { type: 'string', role: 'tooltip', 'p': { 'html': true } } ); | memo.data.addColumn( { type: 'string', role: 'tooltip', 'p': { 'html': true } } ); | ||
memo.data.addColumn( 'number', 'Talvi (loka-huhtikuu)' ); | memo.data.addColumn( 'number', 'Talvi (loka-huhtikuu)' ); | ||
| Rivi 1 040: | Rivi 1 041: | ||
if ( memo.summerwinter ) { | if ( memo.summerwinter ) { | ||
memo.options.trendlines[0] = { labelInLegend: i18n['trendline'][memo.lang], tooltip: false, color: colors['summer'], lineWidth: 3, originalLineWidth: 3, opacity: 1, type: | memo.options.trendlines[0] = { 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['winter'], lineWidth: 3, originalLineWidth: 3, opacity: 1, type: | memo.options.trendlines[1] = { labelInLegend: i18n['trendline'][memo.lang], tooltip: false, color: colors['winter'], lineWidth: 3, originalLineWidth: 3, opacity: 1, type: memo.trendType, 'degree': 2, visibleInLegend: false }; | ||
} else { | } else { | ||
memo.options.trendlines[0] = { labelInLegend: i18n['trendline'][memo.lang], tooltip: false, color: colors['trend'], lineWidth: 3, originalLineWidth: 3, opacity: 1, type: | memo.options.trendlines[0] = { labelInLegend: i18n['trendline'][memo.lang], tooltip: false, color: colors['trend'], lineWidth: 3, originalLineWidth: 3, opacity: 1, type: memo.trendType, 'degree': 2, visibleInLegend: memo.trendType!='moving' }; | ||
} | } | ||
//console.log( memo ); | //console.log( memo ); | ||
if ( memo.trendType = 'smart' ) { | if ( memo.trendType = 'smart' ) { | ||
for ( var t in memo.options.trendlines ) { | for ( var t in memo.options.trendlines ) { | ||
| Rivi 1 055: | Rivi 1 058: | ||
} | } | ||
} | } | ||
} | } | ||
} | } | ||


