|
|
@ -54,6 +54,7 @@ export default { |
|
|
|
} |
|
|
|
var centerImg = require('@/assets/images/circle-bg.png') |
|
|
|
const option = { |
|
|
|
baseOption: { |
|
|
|
tooltip: { |
|
|
|
show: false, |
|
|
|
trigger: 'item', |
|
|
@ -139,7 +140,6 @@ export default { |
|
|
|
left: '-50%', |
|
|
|
radius: ['60%', '70%'], |
|
|
|
avoidLabelOverlap: false, |
|
|
|
|
|
|
|
label: { |
|
|
|
show: false, |
|
|
|
position: 'center' |
|
|
@ -168,24 +168,6 @@ export default { |
|
|
|
fontWeight: 600, |
|
|
|
color: '#317FFF', |
|
|
|
fontFamily: 'DingTalk_JinBuTi_Regular', |
|
|
|
// color: { |
|
|
|
// type: 'linear', |
|
|
|
// x: 0, |
|
|
|
// y: 0, |
|
|
|
// x2: 0, |
|
|
|
// y2: 1, |
|
|
|
// colorStops: [ |
|
|
|
// { |
|
|
|
// offset: 0, |
|
|
|
// color: 'red' // 0% 处的颜色 |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// offset: 1, |
|
|
|
// color: 'yellow' // 100% 处的颜色 |
|
|
|
// } |
|
|
|
// ], |
|
|
|
// globalCoord: false // 缺省为 false |
|
|
|
// }, |
|
|
|
lineHeight: 34 |
|
|
|
}, |
|
|
|
b: { |
|
|
@ -200,6 +182,68 @@ export default { |
|
|
|
data: optionData |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
media: [ |
|
|
|
{ |
|
|
|
query: { |
|
|
|
maxWidth: 317 |
|
|
|
}, |
|
|
|
option: { |
|
|
|
legend: { |
|
|
|
right: 30, |
|
|
|
top: 'center', |
|
|
|
textStyle: { |
|
|
|
rich: { |
|
|
|
name: { |
|
|
|
fontSize: 14 |
|
|
|
}, |
|
|
|
num: { |
|
|
|
fontSize: 16 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 中心图片配置(关键代码) |
|
|
|
graphic: [ |
|
|
|
{ |
|
|
|
left: '8%', // 调整图片位置 |
|
|
|
top: '26%', // 调整图片位置 |
|
|
|
z: -10, |
|
|
|
bounding: 'raw', |
|
|
|
rotation: 0, // 旋转 |
|
|
|
origin: [64.5, 32.5], // 中心点 |
|
|
|
scale: [1.0, 1.0], // 缩放 |
|
|
|
// 设置图片样式 |
|
|
|
style: { |
|
|
|
image: centerImg, |
|
|
|
width: 110, |
|
|
|
height: 110, |
|
|
|
opacity: 1 |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
type: 'pie', |
|
|
|
radius: ['50%', '55%'], |
|
|
|
emphasis: { |
|
|
|
label: { |
|
|
|
rich: { |
|
|
|
c: { |
|
|
|
fontSize: 22, |
|
|
|
lineHeight: 28 |
|
|
|
}, |
|
|
|
b: { |
|
|
|
fontSize: 16 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
myChart.setOption(option) |
|
|
|
// // 然后可以通过定时器来旋转背景图 |
|
|
@ -216,7 +260,7 @@ export default { |
|
|
|
// }) |
|
|
|
// }, 1000) |
|
|
|
|
|
|
|
this.$LoopShowTooltip(myChart, option, { loopSeries: true, interval: 4000 }) |
|
|
|
this.$LoopShowTooltip(myChart, option.baseOption, { loopSeries: true, interval: 4000 }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|