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( { 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 } ); | + | 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: true } ); |
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( { 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 } ); | + | 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: false } ); |
if ( memo.seriesA[ s ].trendline != 'none' ) { | if ( memo.seriesA[ s ].trendline != 'none' ) { | ||
Rivi 954: | Rivi 954: | ||
memo.selectedCol = 0; | memo.selectedCol = 0; | ||
google.visualization.events.addListener( memo.chart, 'select', function () { | google.visualization.events.addListener( memo.chart, 'select', function () { | ||
+ | |||
+ | for ( var c in memo.options.series ) { | ||
+ | if ( memo.options.series[c].highlight ) { | ||
+ | memo.options.series[c].lineWidth = 0; | ||
+ | //memo.options.series[c].pointSize = memo.options.series[c].origSize; | ||
+ | memo.options.series[c].color = colors['obses']; | ||
+ | memo.options.series[c].visibleInLegend = false; | ||
+ | } | ||
+ | } | ||
var selection = memo.chart.getSelection(); | var selection = memo.chart.getSelection(); | ||
Rivi 963: | Rivi 972: | ||
var sSeries = ''; | var sSeries = ''; | ||
− | for (var c in memo.options.series) { | + | for (var c in memo.options.series) { |
− | |||
if ( memo.options.series[c].label == sLabel ) { | if ( memo.options.series[c].label == sLabel ) { | ||
− | sSeries = c; | + | sSeries = c; break; |
− | } | + | } |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | + | ||
− | + | if ( memo.options.series[c].highlight ) { | |
− | + | //memo.selectedCol = col; | |
− | |||
− | memo.selectedCol = col; | ||
memo.options.series[ sSeries ].lineWidth = 3; | 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[ sSeries ].color = colors[ 'selObses' ]; | memo.options.series[ sSeries ].color = colors[ 'selObses' ]; | ||
memo.options.series[ sSeries ].visibleInLegend = true; | memo.options.series[ sSeries ].visibleInLegend = true; | ||
− | + | } | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | } | ||
} | } |