Reputation: 559
Is it possible to add a circle around a pie chart in highcharts?
I know I can do it with an absolute positioned div just over the size of the chart, with a negative zIndex, but it doesn't look entirely right since the graph is drawn with SVG (notice the slight offset on the attached image where I've tried that approach
Thank you!
Upvotes: 0
Views: 1295
Reputation: 12717
You could use a shadow with a 0 offset.
http://jsfiddle.net/blaird/RgdJ3/
$(function () {
$('#container').highcharts({
chart: {
type: 'pie'
},
plotOptions: {
pie: {
shadow: {
color: 'black',
offsetX : 0,
offsetY: 0,
opacity: 1,
width: 3
}
}
},
series: [{
data: [
['Firefox', 44.2],
['IE7', 26.6],
['IE6', 20],
['Chrome', 3.1],
['Other', 5.4]
]
}]
});
});
Upvotes: 3