pie chart doesnt render small slices correctly (#9016)

Backports PR #8986

**Commit 1:**
pie chart doesnt render small slices correctly

* Original sha: a5c23a5960
* Authored by ppisljar <peter.pisljar@gmail.com> on 2016-11-07T09:39:07Z

**Commit 2:**
changing to scientific notation

* Original sha: b31258da36
* Authored by ppisljar <peter.pisljar@gmail.com> on 2016-11-08T09:43:02Z
This commit is contained in:
jasper 2016-11-09 06:53:55 -05:00 committed by Peter Pisljar
parent 3cf5df3be1
commit ac3cccf3d2

View file

@ -119,6 +119,7 @@ export default function PieChartFactory(Private) {
return Math.max(0, Math.min(2 * Math.PI, x(d.x)));
})
.endAngle(function (d) {
if (d.dx < 1e-8) return x(d.x);
return Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx)));
})
.innerRadius(function (d) {