<template>
  <div :id="id" :style="{ width: width, height: height }"></div>
</template>

<script>
import { chartOptionMixins } from "@/views/analyse/custom/mixins";

export default {
  mixins: [chartOptionMixins],
  name: "CPie",
  data() {
    return {
      id: 'pie'
    }
  },
  mounted() {
  },
  methods: {
    getOption() {
      return {
        tooltip: {
          trigger: 'item'
        },
        legend: {
          type: this.form.setting.type2,
          show: this.form.setting.legend,
          textStyle: {
            fontFamily: this.form.setting.fontFamily3,
            color: this.form.setting.legendColor,
            fontSize: this.form.setting.legendFontSize
          },
          ...this.getLegendLocation(),
        },
        series: [
          {
            name: '',
            type: 'pie',
            data: this.getSeriesData()
          }
        ]
      }
    },
  }
}
</script>
