highcharts 制作3D立体饼图

由于公司项目的需求,需要做一个立体的饼图来展示数据,但是翻了很久Echarts的手册,始终找不到解决的方法。于是开始接触了highcharts.发现highcharts可以很轻松的制作一个立体的饼图。而且视觉效果很棒。所以,写下这篇博客,希望可以帮助到同样有3D立体饼图需求的人。draw:function (data) {
$("."+this.install.sty).highcharts({
chart: {
type: 'pie',
backgroundColor: '#EDEDED',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
title: {
text: this.install.name
},
exporting: {
enabled:false
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
formatter:function(){
return this.point.name+'('+this.point.percentage.toFixed(1)+"%)";
},
connectorWidth:1,
distance:5
}
}
},
series: [{
type: 'pie',
name: '占比',
data:data
}]
});
}

实现效果如图所示:
highcharts 制作3D立体饼图