Ero sivun ”Widget:Test4” versioiden välillä
Järvi-meriwikistä
Rivi 786: | Rivi 786: | ||
memo.data.addColumn( { type: 'string', role: 'annotation' } ); | memo.data.addColumn( { type: 'string', role: 'annotation' } ); | ||
− | memo.options.series.push( { 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 } ); | + | 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 } ); |
if ( memo.seriesA[ s ].trendline != 'none' ) { | if ( memo.seriesA[ s ].trendline != 'none' ) { | ||
Rivi 804: | Rivi 804: | ||
memo.data.addColumn( { type: 'string', role: 'annotation' } ); | memo.data.addColumn( { type: 'string', role: 'annotation' } ); | ||
− | memo.options.series.push( { 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 } ); | + | 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 } ); |
if ( memo.seriesA[ s ].trendline != 'none' ) { | if ( memo.seriesA[ s ].trendline != 'none' ) { | ||
Rivi 957: | Rivi 957: | ||
var selection = memo.chart.getSelection(); | var selection = memo.chart.getSelection(); | ||
− | if (selection.length > 0) { | + | if ( selection.length > 0 ) { |
− | + | ||
var col = selection[0].column; | var col = selection[0].column; | ||
− | + | var sLabel = memo.data.getColumnLabel( selection[0].column; | |
− | + | var sSeries = ''; | |
− | |||
− | |||
− | |||
− | |||
for (var c in memo.options.series) { | for (var c in memo.options.series) { | ||
− | if (memo.options.series[c].hideThis) { | + | |
+ | if ( memo.options.series[c].label == sLabel ) { | ||
+ | sSeries = c; | ||
+ | } | ||
+ | |||
+ | if ( memo.options.series[c].hideThis ) { | ||
memo.options.series[c].lineWidth = 0; | memo.options.series[c].lineWidth = 0; | ||
//memo.options.series[c].pointSize = memo.options.series[c].origSize; | //memo.options.series[c].pointSize = memo.options.series[c].origSize; | ||
Rivi 976: | Rivi 977: | ||
} | } | ||
− | if (col != memo.selectedCol && memo.options.series[ | + | if ( col != memo.selectedCol && memo.options.series[ sSeries ].hideThis ) { |
memo.selectedCol = col; | memo.selectedCol = col; | ||
− | memo.options.series[ | + | memo.options.series[ sSeries ].lineWidth = 3; |
//memo.options.series[(col-1)/4].pointSize = 12; | //memo.options.series[(col-1)/4].pointSize = 12; | ||
− | memo.options.series[ | + | memo.options.series[ sSeries ].color = colors['selObses']; |
− | memo.options.series[ | + | memo.options.series[ sSeries ].visibleInLegend = true; |
} else { | } else { | ||
memo.selectedCol = 0; | memo.selectedCol = 0; | ||
Rivi 987: | Rivi 988: | ||
} else { | } else { | ||
− | + | ||
memo.selectedCol = 0; | memo.selectedCol = 0; | ||