pie chart doesnt render small slices correctly

This commit is contained in:
ppisljar 2016-11-07 10:39:07 +01:00
parent aa69744f67
commit a5c23a5960

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 < 0.00000001) return x(d.x);
return Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx)));
})
.innerRadius(function (d) {