Created
June 11, 2016 17:59
-
-
Save petebrowne/ee00a54372e093ffc4ef9c7d1f80d804 to your computer and use it in GitHub Desktop.
This file contains 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
class Slice extends React.Component { | |
render() { | |
let {value, fill, innerRadius = 0, outerRadius} = this.props; | |
// https://github.com/d3/d3/wiki/SVG-Shapes#arc | |
let arc = d3.svg.arc() | |
.innerRadius(innerRadius) | |
.outerRadius(outerRadius); | |
return ( | |
<path d={arc(value)} fill={fill} /> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment