百分比

描述:当前是关于Echarts图表中的 饼图 示例。
 
            const value = 20;
option = {
   backgroundColor: '#000E1A',
   title: {
      show: false
   },
   series: [
      {
         type: 'pie',
         radius: ['52%', '40%'],
         silent: true,
         clockwise: true,
         startAngle: '265',
         label: {
            normal: {
               position: 'center',
            },
         },
         data: [
            {
               value: value,
               name: '',
               itemStyle: {
                  normal: {
                     color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
                        {
                           offset: 0,
                           color: 'rgba(0, 85, 255, 0.41)'
                        },
                        {
                           offset: 0.5,
                           color: 'rgba(0, 107, 255, 1)'
                        },
                        {
                           offset: 1,
                           color: 'rgba(210, 235, 255, 1)'
                        }
                     ])
                  },
               },
            },
            {
               value: 100 - value,
               name: '',
               label: {
                  normal: {
                     show: false,
                  },
               },
               itemStyle: {
                  normal: {
                     color: 'rgba(255, 255, 255, 0)',
                  },
               },
            },
         ],
      },
   ],
};