其他分享
首页 > 其他分享> > echarts饼图设置渐变色

echarts饼图设置渐变色

作者:互联网

设置渐变色

 color1 = new ECharts.graphic.LinearGradient(0,1,0,0,[{ offset: 0, color: "rgba(100,160,255,0.5)" }, { offset: 1, color: "#0AC8FF" }],false)
 color2 = new ECharts.graphic.LinearGradient(0,1,0,0,[{ offset: 0, color: "rgba(15,75,255,0.5)" }, { offset: 1, color: "#6D7BFF" }],false)
style = [color2, color2]

  带入echarts饼图

series:[
  {
    type: 'pie',   
    color: style,
  }

]

  效果如下图

 

标签:false,color,渐变色,0.5,color2,设置,offset,echarts
来源: https://www.cnblogs.com/ymbcc/p/15575679.html