Information
Two colors can be used for the gradient. Additionally to the color, the opacity can also be changed
- First colour "rgba(15,15,15, 1)" or "rgba(15,15,15)" → full opacity
- Second colour "rgba(15,15,15, 0)" → no opacity = white
Configuration
It is best to configure it directly within the JSON under "plotOptions":
Using "linearGradient" the direction of the gradient can be adjusted. The parameters x1 to y2 decide at which side the first color will start: x1 = left, x2 = right, y1 = bottom, y2 = top.
Under "stops" the gradient colors and their opacity get defined. The first three parameters of rgba() determine the color. Opacity is defined by the fourth parameter: 0 = no opacity, 1 = full opacity. As 1 represents 100%, the degree of opacity can be changed using decimal places (e.g. 0.5).
The code above would create a gradient from top to bottom with the bottom being white.
JSON
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article