/*highcharts视图js表格图*/
var chart1 = Highcharts.chart('container1', {
chart: {
type: 'cylinder',
options3d: {
enabled: true,
alpha: 10,
beta: 10,
depth: 100,
viewDistance: 50
}
},
title: {
text: '部门人数'
},
plotOptions: {
series: {
depth: 25,
colorByPoint: true
}
},
series: [{
//seriesData是json数据
data:seriesData,
name: '部门人数',
showInLegend: false
}],
xAxis:[{
title: {
enabled: true,
text:"部门",
style:"color:#000;"
},
categories:categories,
}],
yAxis:[{
title: {
enabled: true,
text:"人数",
style:"color:#000;"
}
}]
})
/*highcharts视图js圆圈图*/
var chart2 = Highcharts.chart('container2', {
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
},
width:400,
height:400,
},
title: {
text: '部门人员占比'
},
tooltip: {
pointFormat: '{series.name}:{point.percentage:.1f}%'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
name: '部门人员占比',
//seriesData是json数据
data: seriesData
}]
});