echarts折线图设置渐变色


series: [
   {
       type: 'line',
       areaStyle: {
            color: {
              type: 'linear',
              x: 0,
              y: 0,
              x2: 0,
              y2: 1,
              colorStops: [{
                offset: 0, color: 'rgba(125,72,255,0.5)'
              }, {
                offset: 1, color: 'rgba(0,180,255,0.3)'
              } ],
              global: false
            }
      },

    }       
]            

 

 

 

设置折线图颜色为渐变色,效果如下图

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM