hbt-training-ui/src/components/home/left/chartData.js

99 lines
2.7 KiB
JavaScript

export const pieChartData = {
title: {
text: '90%',
subtext: '在线率',
itemGap: 5,
x: 105,
y: '37%',
textStyle: {
fontSize: 30,
fontWeight: '600',
fontStyle: 'italic',
color: '#E8E8E8',
},
subtextStyle: {
fontSize: 17,
fontWeight: 'normal',
align: "center",
color: '#E8E8E8'
},
},
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
right: '0%',
top: 'bottom',
height:100,
itemWidth: 10,
itemHeight: 10,
data: [
{value: 25, name: '气体'},
{value: 25, name: '水质'},
{value: 15, name: '特征污染物'},
{value: 20, name: '废气'},
{value: 15, name: '废水'}
],
textStyle: {
color: '#D4E5FF',
padding: [5, 10, 5, 10]
},
},
series: [
{
type: 'pie',
selectedMode: 'single',
selectedOffset: 10,
left:-50,
radius: [50, 75],
data: [
{value: 25, name: '气体',num:90},
{value: 1, name: '',num:0},
{value: 25, name: '水质',num:95},
{value: 1, name: '',num:0},
{value: 15, name: '特征污染物',num:94},
{value: 1, name: '',num:0},
{value: 20, name: '废气',num:91},
{value: 1, name: '',num:0},
{value: 15, name: '废水',num:89},
{value: 1, name: '',num:0},
],
color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null],
emphasis: {
itemStyle: {
// shadowBlur: 10,
shadowOffsetX: 0,
// borderWidth:5,
// borderColor:"rgba(255,255,255,0)",
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
itemStyle: {},
select: {
itemStyle: {}
},
labelLine: {
show: false
},
label: {
show: false
},
tooltip:{
backgroundColor:'rgba(0,0,0,0.4)',
textStyle:{
color:'#ffffff'
},
formatter:function (params) {
return params.data.name+' : '+ params.data.num+'%'
}
}
}
],
animationDuration: 0,
animationDurationUpdate: 3000,
animationEasing: 'linear',
animationEasingUpdate: 'linear'
}