Ero sivun ”Widget:Test4” versioiden välillä
Järvi-meriwikistä
Rivi 632: | Rivi 632: | ||
var size = 6; | var size = 6; | ||
var line = 0; | var line = 0; | ||
+ | var highlight = true; | ||
if ( memo.seasonsA[ s ].id == memo.curSeason ) { | if ( memo.seasonsA[ s ].id == memo.curSeason ) { | ||
legend = true; color = colors.curObses; | legend = true; color = colors.curObses; | ||
size = 9; | size = 9; | ||
line = 4; | line = 4; | ||
+ | highlight = false; | ||
} | } | ||
− | memo.seriesA.push( { 'type': 'scatter', 'title': memo.seasonsA[ s ].id, 'color': color, 'size': size, 'line': line, 'legend': legend, 'trendline': 'none', obses: [] } ); | + | memo.seriesA.push( { 'type': 'scatter', 'title': memo.seasonsA[ s ].id, 'highlight': highlight, 'color': color, 'size': size, 'line': line, 'legend': legend, 'trendline': 'none', obses: [] } ); |
for ( var o in memo.seasonsA[ s ].obses ) { | for ( var o in memo.seasonsA[ s ].obses ) { | ||
memo.seriesA[ memo.seriesA.length - 1 ].obses.push( { | memo.seriesA[ memo.seriesA.length - 1 ].obses.push( { | ||
Rivi 648: | Rivi 650: | ||
} | } | ||
} | } | ||
− | memo.seriesA.push( { 'type': 'scatter', 'title': memo.obsMinDate.getFullYear() + '-' + memo.obsMaxDate.getFullYear(), 'color': colors.obses, 'size': 6, 'line': 0, 'legend': true, 'trendline': 'none', obses: [] } ); | + | memo.seriesA.push( { 'type': 'scatter', 'title': memo.obsMinDate.getFullYear() + '-' + memo.obsMaxDate.getFullYear(), 'highlight': false, 'color': colors.obses, 'size': 6, 'line': 0, 'legend': true, 'trendline': 'none', obses: [] } ); |
// make week averages | // make week averages | ||
Rivi 745: | Rivi 747: | ||
devAvg = devSum/devC; | devAvg = devSum/devC; | ||
− | console.log( memo.avgWA ); | + | //console.log( memo.avgWA ); |
− | memo.seriesA.push( { 'type': 'area', 'title': 'Running', 'color': colors.average, 'size': 0, 'line': 2.33, 'legend': true, 'trendline': 'none', obses: [] } ); | + | memo.seriesA.push( { 'type': 'area', 'title': 'Running', 'highlight': false, 'color': colors.average, 'size': 0, 'line': 2.33, 'legend': true, 'trendline': 'none', obses: [] } ); |
for ( var w in memo.avgWA ) { | for ( var w in memo.avgWA ) { | ||
memo.seriesA[ memo.seriesA.length - 1 ].obses.push( { | memo.seriesA[ memo.seriesA.length - 1 ].obses.push( { | ||
Rivi 759: | Rivi 761: | ||
} | } | ||
/* | /* | ||
− | memo.seriesA.push( { 'type': 'scatter', 'title': 'Hull', 'color': 'green', 'size': 0, 'line': 2.33, 'legend': true, 'trendline': 'none', obses: [] } ); | + | memo.seriesA.push( { 'type': 'scatter', 'title': 'Hull', 'highlight': false, 'color': 'green', 'size': 0, 'line': 2.33, 'legend': true, 'trendline': 'none', obses: [] } ); |
for ( var w in memo.avgWA ) { | for ( var w in memo.avgWA ) { | ||
memo.seriesA[ memo.seriesA.length - 1 ].obses.push( { | memo.seriesA[ memo.seriesA.length - 1 ].obses.push( { | ||
Rivi 786: | Rivi 788: | ||
memo.data.addColumn( { type: 'string', role: 'annotation' } ); | memo.data.addColumn( { type: 'string', role: 'annotation' } ); | ||
− | memo.options.series.push( { label: memo.seriesA[ s ].title, type: 'line', curveType: 'function', pointType: 'circle', pointSize: memo.seriesA[ s ].size, lineWidth: memo.seriesA[ s ].line, 'color': memo.seriesA[ s ].color, 'visibleInLegend': memo.seriesA[ s ].legend, highlight: | + | memo.options.series.push( { label: memo.seriesA[ s ].title, type: 'line', curveType: 'function', pointType: 'circle', pointSize: memo.seriesA[ s ].size, lineWidth: memo.seriesA[ s ].line, 'color': memo.seriesA[ s ].color, 'visibleInLegend': memo.seriesA[ s ].legend, highlight: memo.seriesA[ s ].highlight } ); |
if ( memo.seriesA[ s ].trendline != 'none' ) { | if ( memo.seriesA[ s ].trendline != 'none' ) { | ||
Rivi 804: | Rivi 806: | ||
memo.data.addColumn( { type: 'string', role: 'annotation' } ); | memo.data.addColumn( { type: 'string', role: 'annotation' } ); | ||
− | memo.options.series.push( { label: memo.seriesA[ s ].title, type: 'area', curveType: 'function', pointType: 'circle', pointSize: memo.seriesA[ s ].size, lineWidth: memo.seriesA[ s ].line, 'color': memo.seriesA[ s ].color, 'areaOpacity': 0.8, 'visibleInLegend': memo.seriesA[ s ].legend, highlight: | + | memo.options.series.push( { label: memo.seriesA[ s ].title, type: 'area', curveType: 'function', pointType: 'circle', pointSize: memo.seriesA[ s ].size, lineWidth: memo.seriesA[ s ].line, 'color': memo.seriesA[ s ].color, 'areaOpacity': 0.8, 'visibleInLegend': memo.seriesA[ s ].legend, highlight: memo.seriesA[ s ].highlight } ); |
if ( memo.seriesA[ s ].trendline != 'none' ) { | if ( memo.seriesA[ s ].trendline != 'none' ) { |