The sparkline chart utilizes a variety of area
charts and incorporates gradient for the area
series using the option series.fillColor
in the following manner:
For example:
series: [{
data: [1, 2, 3, 4, 5],
fillColor: {
linearGradient: {
x1: 0,
y1: 0,
x2: 0,
y2: 1
},
stops: [
[0, Highcharts.getOptions().colors[0]],
[1, Highcharts.color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
]
}
}]
Demonstrations:
https://jsfiddle.net/BlackLabel/ak1yrL0w/
https://jsfiddle.net/BlackLabel/sr0xnw1d/
API Reference:
https://api.highcharts.com/highcharts/series.area.fillColor