圆环图

描述:当前是关于Echarts图表中的 饼图 示例。
 
            option = {
  legend: {
    orient: 'vertical',
    right: '20',
    top: '40%',
    icon: 'circle',
    itemWidth: 8,
    itemHeight: 8,
  },
  color: ["#1890FF", "#36CBCB", "#4ECB73", "#FBD437", "#7AC0EF", "#975FE5"],
  series: [
    {
      name: 'Access From',
      type: 'pie',
      radius: ['22%', '30%'],
      avoidLabelOverlap: false,
      label: {
        show: false,
        // position: 'center'
      },
      emphasis: {
        label: {
          show: true,
          formatter(param) {
            return param.name + ' (' + param.percent * 2 + '%)';
          },
          color:'#282828',
          fontSize:14,
        },
        labelLine: {
          lineStyle: {
            color: '#4DA5E0'
          }
        }
      },
      data: [
        { value: 1048, name: 'Search Engine' },
        { value: 735, name: 'Direct' },
        { value: 580, name: 'Email' },
        { value: 484, name: 'Union Ads' },
        { value: 300, name: 'Video Ads' }
      ]
    },
    {
      name: '任务类型',
      type: 'pie',
      radius: ['0%', '0%'],
      itemStyle: {
        color: 'transparent'
      },
      label: {
        position: 'inside',
        formatter: `{data|{c}}\n{serie|{a}}`,
        rich: {
          data: {
            fontWeight: '400',
            fontSize: 24,
            color: `#504F4F`,
            lineHeight: 36,
            textBorderColor: `transparent`,
            textBorderWidth: 0
          },
          serie: {
            fontSize: 16,
            color: `#504F4F`,
            textBorderColor: `transparent`,
            textBorderWidth: 0
          }
        }
      },
      labelLine: {
        show: false
      },
      data: [123]
    }
  ]
};