图标百分比/占比

描述:当前是关于Echarts图表中的 饼图 示例。
 
            const colorList = ['#CAE2A1', '#9FD9BF']
option = {
   title: [
      {
         text: `{val|${22}}`,
         top: 'center',
         left: 'center',
         textStyle: {
            rich: {
               val: {
                  fontSize: 16,
                  fontFamily: 'Avenir, Avenir',
                  fontWeight: 'bold',
                  color: 'red'
               }
            }
         }
      }
   ],
   series: [
      {
         name: '',
         type: 'pie',
         radius: ['35%', '60%'],
         center: ['50%', '50%'],
         avoidLabelOverlap: false,
         label: {
            show: false
         },
         emphasis: {
            disabled: true
         },
         labelLine: {
            show: false
         },
         data: [
            {
               value: 22,
               name: '百分比',
               itemStyle: {
                  color: {
                     x: 0,
                     y: 0,
                     x2: 1,
                     y2: 1,
                     colorStops: [
                        {
                           offset: 0,
                           color: colorList[0] // 0% 处的颜色
                        },
                        {
                           offset: 1,
                           color: colorList[1] // 100% 处的颜色
                        }
                     ]
                  }
               }
            },
            { value: 100 - 22, name: '百分比', itemStyle: { color: '#EDEDED' } }
         ]
      }
   ]
}