I created a 3D pie chart using the Highchart plugin and wanted to add borders to each portion. I tried adding the following code:
borderWidth: 4,
borderColor: "red"
within the plotOptions: pie:
section. However, I noticed that the portions were getting bordered with the same color as they were filled.
Is there a way to differentiate these portions? The border color doesn't necessarily have to be red, but I do need them to stand out.
Here is a jsfiddle link where you can experiment: http://jsfiddle.net/qRvn2/
JS
$(function () {
$('#container').highcharts({
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
title: {
text: 'Browser market shares at a specific website, 2014'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
borderWidth: 4,
borderColor: "red",
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
},
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
]
}]
});
});
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-3d.js"></script>
<div id="container" style="height: 400px"></div>