<template>
  <v-chart
    style="width:100%;height:100%"
    :auto-resize="true"
    :options="option"/>
</template>
<script>
export default {
  data () {
    return {
      option: {
        color: ['#F5501E', '#EFDF2A', '#0AA6EB', '#7DB713', '#7A55BB', '#FE645F', '#FECA62', '#4ECAD0'],
        legend: {
          orient: 'horizontal',
          bottom: 10,
          left: 'center'
        },
        tooltip: {
          trigger: 'item',
          formatter: '{b}: {c} ({d}%)'
        },
        grid: {
          top: 35,
          left: 0,
          right: 20,
          bottom: 0,
          containLabel: true
        },
        series: [
          {
            name: '金额',
            type: 'pie',
            center: ['30%', '50%'],
            radius: ['30%', '60%'],
            avoidLabelOverlap: false,
            label: {
              normal: {
                show: false,
                position: 'center'
              },
              emphasis: {
                show: true,
                textStyle: {
                  fontSize: '30',
                  fontWeight: 'bold'
                }
              }
            },
            labelLine: {
              normal: {
                show: false
              }
            },
            data: [
              {value: 3235, name: '已检票'},
              {value: 2310, name: '待检票'},
              {value: 235, name: '已退票'}
            ]
          }, {
            name: '数量',
            type: 'pie',
            center: ['70%', '50%'],
            radius: ['30%', '60%'],
            avoidLabelOverlap: false,
            label: {
              normal: {
                show: false,
                position: 'center'
              },
              emphasis: {
                show: true,
                textStyle: {
                  fontSize: '30',
                  fontWeight: 'bold'
                }
              }
            },
            labelLine: {
              normal: {
                show: false
              }
            },
            data: [
              {value: 3235, name: '已检票'},
              {value: 2310, name: '待检票'},
              {value: 235, name: '已退票'}
            ]
          }
        ]
      }
    }
  },
  mounted () {
  }
}
</script>
