0
當我將光標懸停在單個酒吧時,我需要將未選中的酒吧調成堆疊列(Highcharts)。Highcharts在懸停時調暗未選中的酒吧顏色
當前代碼:
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Stacked column chart'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
min: 0,
title: {
text: 'Total fruit consumption'
}
},
tooltip: {
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.percentage:.0f}%)<br/>',
shared: true
},
plotOptions: {
column: {
stacking: 'percent'
}
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2]
}, {
name: 'Jane',
data: [2, 2, 3, 2, 1]
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5]
}]
});
你問,只顯示徘徊條加以強調別人被調光是不是? –
使用鼠標懸停事件http://api.highcharts.com/highcharts/plotOptions.area.events.mouseOver。當事件觸發時,使用point.update()/ series.update()更新點/系列顏色http://api.highcharts.com/highcharts/Point.update – morganfree
@morganfree可否請您添加解決方案的示例作爲答案?謝謝。 –