series层里面
 
itemStyle: {
              normal: {
                // 设置圆角
                barBorderRadius: [6,0,6,0],
                //多条线实现渐变效果
                color:function(params) {
                  var colorList = [
                    ['#662C58','#F84F50'],
                    ['#124480','#46E6ED'],
                    ['#032786','#0068F2'],
                    ['#433E68','#E7A95F'],
                    ['#0D3285','#1E76C8'],
                    ['#433E68','#E7A95F'],
                    ['#662C58','#F84F50'],
                    ['#124480','#46E6ED']
                  ]
                  var index=params.dataIndex;
                  if (params.dataIndex >= colorList.length) {
                      index = params.dataIndex - colorList.length;
                  }
                  return new that.$echarts.graphic.LinearGradient(0, 1, 0, 0, [
                  { offset: 0, color: colorList[index][0] },
                  { offset: 1, color: colorList[index][1] }
                  ])
                },
                
              }
            },

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
  • 2021-04-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案