echarts柱状图颜色渐变

series : [
            {
                name:'数量',
                type:'bar', 
                barWidth: 20,
                data:[200, 152, 100],
                itemStyle: {
                  normal: {
                    color: new echarts.graphic.LinearGradient(
                      0, 0, 0, 1,
                    [
                        {offset: 0, color: '#2FDE80'},   
                        {offset: 1, color: '#2FDECA'}
                    ]
                 )
            },
            emphasis: {
              color: new echarts.graphic.LinearGradient(
                    0, 0, 0, 1,
                   [
                    {offset: 0, color: '#2FDECA'},
                    {offset: 1, color: '#2FDE80'}
                   ]
              )
             }
         }
     }]

执行结果如下:echarts柱状图颜色渐变_第1张图片

你可能感兴趣的:(echarts3-0)