• Open in:

Donut with radial gradient

Using property gradientRatio you can achieve any gradient you want. This particular chart uses the following gradient ratio: [-0.4, -0.4, -0.4, -0.4, -0.4, -0.4, 0, 0.1, 0.2, 0.1, 0, -0.2, -0.5]

Negative value means the color will be darker than the original, and positive number means the color will be lighter. gradientRatio array can be of any length you want, depending on a gradient you want to achieve.

Pie chart also supports linear gradient. To enable it set gradientType to linear. However, radial gradients would look much better.

Demo source