Highcharts Gradient Pie Chart
The following example demonstrates a gradient pie chart.
We learned the basic Highcharts configuration syntax in the previous chapters. Now let's look at some other configurations.
Configure
colors Configuration
Use the Highcharts.getOptions().colors property to configure colors.
//Color filling
Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function (color) {
return {
radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
stops: [
[0, color],
[1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
]
};
});
Example
Filename: highcharts_pie_gradient.htm
Highcharts 教程 | Runoob Tutorial(runoob.com)
The output of the above example is:
Highcharts Pie Chart