quanyawei
2023-09-28 edde2a3ea44ab5e9dfe6a69bbf933259c0e105c8
src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue
@@ -1,5 +1,5 @@
<template>
  <div :class="className" :style="{ height: height, width: width }" />
  <div id="myPieChart" :style="{ height: height, width: width }" />
</template>
<script>
@@ -40,6 +40,7 @@
      handler(newVal) {
        console.log('newVal', newVal)
        this.seriesData = []
        this.namelist = []
        const arr = []
        newVal.forEach(item => {
@@ -74,7 +75,12 @@
  },
  methods: {
    initChart() {
      this.chart = echarts.init(this.$el, 'macarons')
      if (this.chart) {
        this.chart.dispose()
      }
      const chartDom = document.getElementById('myPieChart')
      this.chart = echarts.init(chartDom)
      this.chart.clear()
      this.setOptions()
    },
    setOptions() {