聽起來很奇怪,但我在一個圖表中顯示了這3個圖表。Highcharts只顯示一次圖例
問題是,如果我使用showInLegend:true
到每個系列,那麼我有9個項目的傳說。
我只想每次顯示Urban, Rural, Nothing
一次。
這裏是我的代碼: http://jsfiddle.net/HpdwR/1298/
series: [{
data: [{
name: 'Urban',
color: 'red',
y: 4
}, {
name: 'Nothing',
color: 'blue',
y: 2
}, {
name: 'Rural',
color: 'green',
y: 4,
}],
size: '130px',
innerSize: '115px',
center: ['12%'],
name: 'first',
showInLegend: true
}, {
data: [{
color: 'red',
y: 1
}, {
color: 'blue',
y: 4
}, {
color: 'green',
y: 5
}],
size: '130px',
innerSize: '115px',
center: ['50%'],
name: 'second',
showInLegend: true
}, {
data: [{
color: 'red',
y: 6
}, {
color: 'blue',
y: 2
}, {
color: 'green',
y: 2
}],
size: '130px',
innerSize: '115px',
center: ['88%'],
name: 'third',
showInLegend: true
}]
看到您可以評估這個例子抓住它。 –