|
|
|
@ -39,6 +39,11 @@
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
|
|
|
|
},
|
|
|
|
|
// 判断饼状环形(true-环,false-饼)
|
|
|
|
|
isRing: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
// 扇形区域数据
|
|
|
|
|
opinionData: {
|
|
|
|
|
type: Array,
|
|
|
|
@ -53,6 +58,7 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
console.log('this.opinion',this.opinion)
|
|
|
|
|
this.$nextTick(function() {
|
|
|
|
|
this.drawPie('myChart')
|
|
|
|
|
})
|
|
|
|
@ -85,8 +91,8 @@
|
|
|
|
|
{
|
|
|
|
|
name:this.seriesName, // 提示框标题
|
|
|
|
|
type: 'pie',
|
|
|
|
|
radius : '65%',
|
|
|
|
|
center: ['50%', '50%'],
|
|
|
|
|
radius :this.isRing?['40%','65%']: '50%',
|
|
|
|
|
center: ['50%', '40%'],
|
|
|
|
|
selectedMode: 'single',
|
|
|
|
|
data:this.opinionData, // 扇形区域数据
|
|
|
|
|
itemStyle: {
|
|
|
|
|