<template>
    <div ref="Circular" class="mid"></div>
</template>

<script>
 import * as echarts from 'echarts';
    export default {
        props:['data'],
        methods:{
            setCircularData(){
              const Circular = echarts.init(this.$refs['Circular']);
              let option = {
                title:{
                  text:"创新创业项目类型"
                },
                legend: {
                  orient: 'vertical',
                  top:"10%",
                  left:"left"
                },
                series: [
                  {
                    type: 'pie',
                    label: {
                      show:true,
                      position:"inner",
                      formatter:'{d}%'
                    },
                    data: this.data
                  }
                ]
              }
              Circular.setOption(option)
            },
        },
        mounted(){
            this.setCircularData();
        }
    }
</script>

<style lang="less" scoped>

</style>