<template>
  <div class="pieChart">
    <poi-echart-pie ref="pieChart"></poi-echart-pie>
  </div>
</template>

<script>
export default {
  name: 'pieChart',
  data () {
    return {
      optionValue:{},
    }
  },
  methods:{
    change(){
      let titleData = {
        text: "测试1",
        subtext: "测试2"
      }
      let legendData = ["测试1","测试2","测试3"];
      let seriesData = [ {value:335, name:'测试1'},{value:335, name:'测试2'},{value:335, name:'测试3'},]
      this.$refs.pieChart.dataInitEchart(titleData,legendData,seriesData);
    },
  },
  mounted(){
    let _this = this;
    setTimeout(function(){
      _this.change();
    },3000);
  }
}
</script>

<style scoped>
    *{
      padding: 0;
      margin: 0;
    }
    .pieChart{
      width: 600px;
      height: 300px;
      margin: 0 auto;
      border: 2px solid red;
    }
</style>
