我正在 highchart 上创建折线图。有没有办法让plotBands具有渐变颜色?
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
}],
},
关于highcharts - 在 Plotband Highcharts 上添加渐变颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44689246/