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

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

export default {
  mixins: [chartOptionMixins],
  name: "CDoughnut",
  data() {
    return {
      id: 'doughnut'
    }
  },
  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',
            radius: ['40%', '70%'],
            data: this.getSeriesData()
          }
        ]
      }
    },
  }
}
</script>
