0
我想改变在jsfiddle中制作的饼图的颜色。我试着改变添加其他系列数据的颜色,但它不起作用。如何更改馅饼切片的颜色?
这里是小提琴:http://jsfiddle.net/jpotLvt7/
$(function() {
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: 'Skittle Pack 20oz'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
},
connectorColor: 'silver'
}
}
},
series: [{
type: 'pie',
name: 'Color %',
data: [
['Red', 45.0],
['Yellow', 26.8],
{
name: 'Green',
y: 12.8,
sliced: true,
selected: true
},
['Orange', 8.5],
['Purple', 6.2],
]
}]
});
});