在Plotband上添加渐变色高图

问题描述:

我正在高图上创建折线图。有没有办法让plotBands具有渐变色彩?在Plotband上添加渐变色高图

 plotBands: [{ 
     from: 7, 
     to: 0, 
     color: 'rgba(255, 51, 51, 0.28)' 
    }] 

在这里,你可以检查我的代码,供大家参考 http://jsfiddle.net/MyTestSampleAccount/0nqn5vzs/

您可以使用类似以下内容:

yAxis: { 
    ..., 
    plotBands: [{ 
     color: { 
      linearGradient: { x1: 1, y1: 1, x2: 1, y2: 0 }, 
      stops: [ 
       [0, 'rgb(255, 255, 255)'], 
       [1, 'rgb(200, 200, 255)'] 
      ] 
     }, 
     from: 0, 
     to: 7 
    }], 
}, 

DEMO

+1

感谢你的帮助 –

+0

高兴,它帮助... –