You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.1 KiB
61 lines
2.1 KiB
var myChart5 = echarts.init(document.getElementById("chart_left1"));
|
|
var option5 = {
|
|
title: {
|
|
text: '全部设备87个',
|
|
x: 'center',
|
|
y: 'center',
|
|
textStyle: {
|
|
color: "#fff"
|
|
}
|
|
},
|
|
color: ['#31a0fc', '#db9315', '#cccccc'],
|
|
tooltip: {
|
|
trigger: 'item',
|
|
formatter: "{a} <br/>{b}: {c} ({d}%)"
|
|
},
|
|
legend: {
|
|
|
|
x: 'center',
|
|
y: '220',
|
|
textStyle: {
|
|
color: "#fff"
|
|
},
|
|
data: ['正常设备33个', '报警设备31个', '离线设备23个']
|
|
},
|
|
series: [
|
|
{
|
|
name: '',
|
|
type: 'pie',
|
|
radius: ['50%', '60%'],
|
|
avoidLabelOverlap: false,
|
|
label: {
|
|
normal: {
|
|
show: false,
|
|
position: 'left'
|
|
},
|
|
emphasis: {
|
|
show: true,
|
|
textStyle: {
|
|
fontSize: '15',
|
|
fontWeight: 'bold'
|
|
}
|
|
}
|
|
},
|
|
labelLine: {
|
|
normal: {
|
|
show: false
|
|
}
|
|
},
|
|
data: [
|
|
{ value: 33, name: '正常设备33个' },
|
|
{ value: 31, name: '报警设备31个' },
|
|
{ value: 23, name: '离线设备23个' }
|
|
]
|
|
}
|
|
]
|
|
};
|
|
myChart5.setOption(option5);
|
|
|
|
|
|
|
|
|
|
|