0
在定製兩個系列餅圖的圖例時發現自己完全卡住了。定製兩個系列的Highcharts圖例行爲
的jsfiddle和代碼:
http://jsfiddle.net/jschlick/cCXkj/
colors: ['#f00000', '#f8d10a', '#9edb70'],
legend: {
layout: 'horizontal',
verticalAlign: 'bottom'
},
plotOptions: {
pie: {
point: {
events: {
legendItemClick: function() {
this.select();
elm.tooltip.refresh(this);
return false;
},
mouseOver: function() {
this.select();
elm.tooltip.refresh(this);
return false;
}
}
},
showInLegend: true
},
series: {
dataLabels: {
enabled: true,
format: '{point.percentage}%'
}
}
},
series: [{
type: 'pie',
center: [450, 150],
data: [
["Red", 2],
["Yellow", 5],
["Green", 3]
],
size: '60%',
innerSize: '40%'
}, {
type: 'pie',
linkedTo: ':previous',
center: [150, 150],
data: [
["Red", 1],
["Yellow", 2],
["Green", 7]
],
size: '60%',
innerSize: '40%'
}]
1)我需要的電流傳說點擊行爲(切片數據點)到上懸停,而不是點擊執行。 2)我期望使用「linkedTo:':previous'」也會將第二個圖表與圖例行爲綁定,但只有第一個圖表生效。 I.E.點擊「紅色」將切分兩個圖表上的紅色數據點。
感謝您的任何幫助。
這很好,謝謝!我正在研究:1)在圖例項目上的第二個鼠標懸停只在一個圖表上動畫切片,2)將鼠標懸停在圖例樣本上,同一圖例項目的文本被視爲兩個事件。 – 2013-05-13 01:38:29