$(document).ready(function() {
var chart = {
type: 'pie',
options3d: {
enabled: true,
alpha: 45
}
};
var title = {
text: 'Highcharts图表之3D圆环图'
};
var subtitle = {
text: '前端开发语言占比'
};
var plotOptions = {
pie: {
innerSize: 100,
depth: 45
}
};
var series= [{
name: '占比量',
data: [
['vue3', 45],
['html', 26],
['css3', 12],
['node', 8],
['php', 7]
]
}];
var json = {};
json.chart = chart;
json.title = title;
json.subtitle = subtitle;
json.plotOptions = plotOptions;
json.series = series;
$('#myChart').highcharts(json);
});
点击运行 》