分布图

描述:当前是关于Echarts图表中的 饼图 示例。
 
            option = {
   series: [
      {
         //   silent: true, 是否可点击
         name: 'Access From',
         type: 'pie',
         radius: '50%',
         center: ['50%', '50%'],
         data: [
            { value: 1000, name: '金钱豹' },
            { value: 200, name: '大花猫' },
            { value: 380, name: '赤狐' }
         ],
         itemStyle: {
            color: (list) => {
               let colorList = [
                  {
                     l: 1,
                     b: 0,
                     r: 0,
                     t: 0,
                     colorStart: 'rgba(105, 177, 255, 1)',
                     colorEnd: 'rgba(177, 221, 255, 1)'
                  },
                  {
                     l: 1,
                     b: 0,
                     r: 0,
                     t: 0,
                     colorStart: 'rgba(173, 245, 226, 1)',
                     colorEnd: 'rgba(75, 214, 204, 1)'
                  },
                  {
                     l: 1,
                     b: 0,
                     r: 0,
                     t: 0,
                     colorStart: 'rgba(253, 197, 100, 1)',
                     colorEnd: 'rgba(251, 226, 141, 1)'
                  }
               ]
               return new echarts.graphic.LinearGradient(
                  colorList[list.dataIndex]['l'],
                  colorList[list.dataIndex]['b'],
                  colorList[list.dataIndex]['r'],
                  colorList[list.dataIndex]['t'],
                  [
                     {
                        offset: 0,
                        color: colorList[list.dataIndex]['colorStart']
                     },
                     {
                        offset: 1,
                        color: colorList[list.dataIndex]['colorEnd']
                     }
                  ]
               )
            }
         },
         label: {
            show: false
         },
         labelLine: {
            show: false
         }
      }
   ]
}