Area Line Chart Gradient

This widget script will add a gradient to the widget's area spline charts.
Configure opacity and RGBA colors as per comments.
widget.on('processresult', function(a,b){
// Set colors for the gradient in the "stops" section below.
// The top color (first item in the list) is the top color of the gradient...
// and the bottom color is the bottom of the gradient.
// For the same color all the way through like in the example keep the RGB numbers the same...
// and change the last number representing opacity (0-1).
b.result.plotOptions.areaspline.fillColor = {
linearGradient: {
x1: 0,
y1: 0,
x2: 0,
y2: 1
},
stops: [
[0, 'rgba(17, 120, 153, 0.4)'],
[1, 'rgba(17, 120, 153, 0.0)']
]
}
})
Updated 03-02-2023
intapiuser
Admin
Joined December 15, 2022