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.
|
|
|
// 饼图
|
|
|
|
export default function pieOption(color = [], data = [], ) {
|
|
|
|
return {
|
|
|
|
tooltip: {
|
|
|
|
trigger: 'item',
|
|
|
|
backgroundColor: "#08182F",
|
|
|
|
color: "#fff",
|
|
|
|
borderColor: "#3373CC",
|
|
|
|
textStyle: {
|
|
|
|
color: "#fff", //设置文字颜色
|
|
|
|
fontSize: 9
|
|
|
|
},
|
|
|
|
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
|
|
|
|
confine: true
|
|
|
|
},
|
|
|
|
// 注释字体样式
|
|
|
|
legend: {
|
|
|
|
orient: 'vertical',
|
|
|
|
top: 16,
|
|
|
|
left: 170,
|
|
|
|
itemWidth: 10, //data图标大小
|
|
|
|
itemHeight: 10,
|
|
|
|
itemGap: 50, //图标之间间距
|
|
|
|
// z:-1
|
|
|
|
},
|
|
|
|
// 环形统计图样式
|
|
|
|
series: [{
|
|
|
|
// bottom:68,
|
|
|
|
// right:6,
|
|
|
|
// name: name,
|
|
|
|
type: 'pie',
|
|
|
|
radius: ['66', '40'],
|
|
|
|
avoidLabelOverlap: false,
|
|
|
|
itemStyle: {
|
|
|
|
// borderRadius: 10,
|
|
|
|
borderColor: '#fff',
|
|
|
|
borderWidth: 2
|
|
|
|
},
|
|
|
|
// 点击弹出提示位置
|
|
|
|
label: {
|
|
|
|
show: false,
|
|
|
|
position: 'center'
|
|
|
|
},
|
|
|
|
color: color,
|
|
|
|
//点击弹出提示样式
|
|
|
|
emphasis: {
|
|
|
|
label: {
|
|
|
|
show: true,
|
|
|
|
fontSize: '40',
|
|
|
|
fontWeight: 'bold'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
labelLine: {
|
|
|
|
show: false
|
|
|
|
},
|
|
|
|
// 环形数据
|
|
|
|
data: data
|
|
|
|
}]
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|