我在嘗試複製類似於此的圖表(請參閱下圖)。我爲每個圖表附加了兩個單獨的強盜。Highchart甜甜圈和條形圖
我想實現:Example Image
圓環圖: ===>請參見下面評論的Plunkr
chart: {
type: 'pie'
},
credits: {
enabled: false
},
colors: ['#F59640', '#A589D9', '#F16D64', '#35BEC1', '#EDEDED'],
title: {
text: '82',
style: {
color: '#333333',
fontWeight: 'bold',
fill: '#333333',
width: '211px',
fontSize: '32px'
},
y: -30,
verticalAlign: 'middle'
},
subtitle: {
text: 'out of 100',
style: {
color: '#333333',
fill: '#333333',
width: '211px',
fontSize: '28px'
},
y: 30,
verticalAlign: 'middle'
},
plotOptions: {
pie: {
innerSize: '60%',
outerRadius: '70%',
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
}
}
},
exporting: {
enabled: false
},
series: [{
data: [
['Collaboration', 19.61],
['Reading Articles', 17.47],
['Insight', 19.95],
['Personalization', 25]
]
}]
- 我試圖設置這些值動態地從一個API。總價值是100%,4-5類/系列。
- 它幾乎完整,只需要顯示空白值,如果項目不加起來100%。
條形圖: ===>Bar Chart Plunkr
chart: {
type: 'bar'
},
title: {
text: ''
},
legend: {
enabled: false
},
xAxis: {
categories: ['Collaboration', 'Reading Articles', 'Insight', 'Personalization'],
visible: false,
},
yAxis: {
min: 0,
max: 25,
title: {
text: null
},
stackLabels: {
enabled: true,
},
},
exporting: {
enabled: false
},
plotOptions: {
series: {
stacking: 'percent'
},
bar: {
grouping: false,
dataLabels: {
enabled: false
}
}
},
credits: {
enabled: false
},
series: [{
name: 'Remaining',
data: [5.39, 7.53, 5.05, 0],
borderWidth: 0,
color: 'rgba(0,0,0,0)'
}, {
name: 'Remaining',
data: [5.39, 7.53, 5.05, 0],
borderWidth: 0,
stack: 1,
animation: false,
color: '#CCC'
}, {
name: 'Completed',
data: [{ y: 19.61, color: '#F59640' }, { y: 17.47, color: '#A589D9' }, { y: 19.95, color: '#F16D64' },
{ y: 25, color: '#35BEC1' }]
}]
無法像圖像的各條分開。每個酒吧不堆疊對方。
還嘗試匹配每個欄上面的標籤以及在每個欄下僅顯示第一個和最後一個標籤顯示的Y標籤。
此時無法發佈超過2個鏈接。
非常感謝您的幫助。
附缺少Plunkr爲圓環圖=== >> [圓環圖實施例:(HTTPS:/ /plnkr.co/edit/5ZsHoflpCu8jzm3J0Yui?p=info)<=== –
我上次試圖達成這樣的目標,我加了剩下的r(在甜甜圈和條形圖中)作爲另一個項目... –