48 lines
847 B
Vue
48 lines
847 B
Vue
|
|
<template>
|
||
|
|
<VueEcharts :options="options" autoresize style="width: 100%;height: 100%;"></VueEcharts>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import echartsMixin from "@/mixins/echarts.mixin";
|
||
|
|
export default {
|
||
|
|
name: "Pie2",
|
||
|
|
mixins: [echartsMixin],
|
||
|
|
data () {
|
||
|
|
return {
|
||
|
|
}
|
||
|
|
},
|
||
|
|
computed: {
|
||
|
|
options () {
|
||
|
|
return {
|
||
|
|
title: {
|
||
|
|
show: false
|
||
|
|
},
|
||
|
|
legend: {
|
||
|
|
top: 'bottom',
|
||
|
|
textStyle: {
|
||
|
|
color: '#fff'
|
||
|
|
}
|
||
|
|
},
|
||
|
|
series: [
|
||
|
|
{
|
||
|
|
name: this.title,
|
||
|
|
type: 'pie',
|
||
|
|
radius: ['0%', '50%'],
|
||
|
|
center: ['50%', '50%'],
|
||
|
|
// roseType: 'area',
|
||
|
|
itemStyle: {
|
||
|
|
borderRadius: 8
|
||
|
|
},
|
||
|
|
data: this.data
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style scoped>
|
||
|
|
|
||
|
|
</style>
|