This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function explode(d, index) { | |
var offset = 10; | |
var angle = (d.startAngle + d.endAngle) / 2; | |
var xOff = Math.sin(angle) * offset; | |
var yOff = -Math.cos(angle) * offset; | |
return 'translate(' + xOff + ',' + yOff +')'; | |
} | |
arc.attr('transform', explode); |