我正在使用高图库。我们可以在hightcharts中制作嵌套的dount图表吗?我可以制作圆环图。我想在圆环图中嵌套相同的东西。 换句话说,我制作甜甜圈图表可以在甜甜圈图表中做同样的事情
这是我的代码
http://jsfiddle.net/oupmgvjy/2/
我正在接受这方面的帮助 http://www.highcharts.com/demo
$(function () {
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: 0,
plotShadow: false
},
title: {
text: 'Browser<br>shares<br>2015',
align: 'center',
verticalAlign: 'middle',
y: 40
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
dataLabels: {
enabled: true,
distance: -50,
style: {
fontWeight: 'bold',
color: 'white'
}
},
startAngle: 0,
endAngle: 270,
center: ['50%', '75%']
}
},
series: [{
type: 'pie',
name: 'Election',
innerSize: '85%',
data: [
['a', 55],
['b', 65],
['c', 65],
['d', 132],
{
name: 'Proprietary or Undetectable',
y: 0.2,
dataLabels: {
enabled: false
}
}
]
}]
});
});
答案 0 :(得分:2)
您必须更改系列中的data
和饼图
size
series: [{
type: 'pie',
name: 'Election',
size: '100%',
innerSize: '40%',
data: [{name: "A", y: 20},
{name: "B", y: 10},
{name: "C", y: 15}
]
}, {
type: 'pie',
name: 'Proprietary or Undetectable',
innerSize: '70%',
data: [{name: "A", y: 10},
{name: "B", y: 15},
{name: "C", y: 20}
]
}]