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.
92 lines
2.6 KiB
92 lines
2.6 KiB
import * as echarts from 'echarts'
|
|
|
|
export function pieOption() {
|
|
const center = ["50%", "170px"];
|
|
return {
|
|
color: ["#1A95FF", "#FFAA00", "#04C790"],
|
|
title: {
|
|
text: "",
|
|
subtext: '总数',
|
|
left: '45%',
|
|
top: '35%',
|
|
textAlign :'center',
|
|
textStyle: {
|
|
color: '#7FCEFF',
|
|
fontSize: 18,
|
|
},
|
|
subtextStyle: {
|
|
fontSize: 12,
|
|
color: '#A3B9DA'
|
|
},
|
|
},
|
|
tooltip: {
|
|
show: false,
|
|
},
|
|
// legend: {
|
|
// top: 350,
|
|
// bottom: 0,
|
|
// itemWidth: 20,
|
|
// itemHeight: 10,
|
|
// textStyle: {
|
|
// color: '#D2E7FF',
|
|
// fontSize: 16,
|
|
// lineHeight: 20,
|
|
// },
|
|
|
|
// },
|
|
series: [
|
|
{
|
|
name: 'Access From',
|
|
type: 'pie',
|
|
radius: ['60%', '90%'],
|
|
avoidLabelOverlap: false,
|
|
labelLine: {
|
|
show: false
|
|
},
|
|
data: [],
|
|
label: {
|
|
show: false,
|
|
position: 'center',
|
|
// formatter: data => {
|
|
// console.log(data.color)
|
|
// return `{c_style|${data.percent.toFixed(0)}%}\n{b_style|${data.name}}`
|
|
// // '{c_style|{d}%}\n{b_style|{b}}'
|
|
// },
|
|
// rich: {
|
|
// b_style: {
|
|
// fontSize: 12,
|
|
// fontWeight: 400,
|
|
// color: '#A3B9DA'
|
|
// },
|
|
// c_style: {
|
|
// padding: [0, 0, 5, 0],
|
|
// fontSize: 24,
|
|
// fontWeight: 'bold',
|
|
// color: '#fff'
|
|
// }
|
|
// }
|
|
},
|
|
emphasis: {
|
|
label: {
|
|
show: false,
|
|
fontSize: '14',
|
|
fontWeight: 'normal'
|
|
}
|
|
},
|
|
/* label: {
|
|
show: false,
|
|
position: 'center'
|
|
},
|
|
emphasis: {
|
|
label: {
|
|
show: true,
|
|
fontSize: 40,
|
|
fontWeight: 'bold'
|
|
}
|
|
},*/
|
|
|
|
}
|
|
]
|
|
};
|
|
|
|
}
|
|
|