饼图

描述:当前是关于Echarts图表中的 饼图 示例。
 
             let option = {
    backgroundColor: 'white',
    tooltip: {
      show: true,
      trigger: 'item',
      //{a}(系列名),{b}(数据项名),{c}(数值),{d}(百分比)
      formatter: "{a} <br/>{b} : {c}",
      backgroundColor: "rgba(1, 13, 19, 0.5)",
      borderWidth: 0,
      textStyle: {
        color: "rgba(212, 232, 254, 1)",
        // fontSize: fontChart(0.24),
      },
    },

    legend: {
      orient: 'vertical',
      top: 20,
      left: 40,
      itemWidth: 15,
      itemHeight: 10,
      itemGap: 25,
      borderRadius: 4,
      textStyle: {
        color: "#000",
        fontFamily: "Alibaba PuHuiTi",
        fontSize: 14,
        fontWeight: 400,
      },
    },
    series: [
      {
        name: '',
        type: 'pie',
        radius: '50%',
        center: ['50%', '40%'],
        data: [
          { value: 1048, name: '电子商务行业' },
          { value: 735, name: '金融行业' },
          { value: 580, name: '旅游行业' },
          { value: 484, name: '医疗行业' },
          { value: 300, name: '汽车行业' }
        ],
        label: {
        normal: {
          formatter: ["{b|{b}}","{c|{c}}"].join("\n"),
          rich: {
            c: {
              color: "inherit",
              fontSize: 20,
              fontWeight: "bold",
              lineHeight: 5,
            },
            b: {
              fontSize: 15,
              height: 40,
            },
          },
        },
      },
        emphasis: {
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        }
      },
    ]
  };