<div class="">
<el-row>
<el-col :span="12">
<div id="pieChart" :style="{ height: '96px'}"></div>
</el-col>
<el-col :span="12">
</el-col>
</el-row>
</div>
drawPIe() {
// var i=0;
// 基于准备好的dom,初始化echarts实例
let myChart = this.$echarts.init(document.getElementById("pieChart"));
// 绘制图表
myChart.setOption({
tooltip: {
trigger: 'item'
},
series: [{
name: 'Access From',
type: 'pie',
radius: ['78%', '98%'],
color:[ '#3c82fe','#22ba7d'], //设置对应块的数据
avoidLabelOverlap: true,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
emphasis: {},
labelLine: {
show: false
},
data: [{
value: 1048,
name: '借阅'
},
{
value: 735,
name: '验收'
},
]
}]
});
}