
const getPieChart1 = (data,x,y,legendx) => {
  return {
    tooltip: {
      trigger: 'item'
    },
    legend: {
      orient: 'vertical',  // 垂直排列
      left: legendx? legendx: 'center',        // 靠左放置
      top: 'center',       // 垂直居中
      icon: 'circle',
      itemWidth: 10,
      itemHeight: 10,
      itemGap: 5,
      textStyle: {        // 图例文本样式
        color: '#777',
        fontSize: 12
      },
    },
    color: ['#69b1ff', '#ffc069','#87e8de','#597ef7','#d6e4ff','#ff7875','#b37feb','#4096ff','#ffa39e'],
    series: [
      {
        name: '',
        type: 'pie',
        radius: ['70%', '83%'],
        center: [x,y],
        avoidLabelOverlap: false,

        // itemStyle: {
        //   borderRadius: 10
        // },
        emphasis: {
          label: {
            show: false,
            fontSize: 30,
            fontWeight: 'bold'
          }
        },
        labelLine: {
          show: false
        },
        label: {
          show: false,
          formatter: '{d}%',
          // 防止标签重叠
          position: 'inner',
          alignTo: 'edge',
          margin: 20
        },
        // 设置饼图半径，为标签留出空间
        data: data
      }
    ]
  }
}

export default getPieChart1;