Q:

refactor d3 v3 pie to version 4 unexpected behavior

sample code update:
var updateChart = function(dataset) {
arcs = arcs.data(donut(dataset), d => d.data.label);

arcs.exit().remove();

 arcs.enter().append("path")
.attr("stroke", "white")
.attr("stroke-width", 0.8)
.attr("fill", function(d, i) {
  return color(i);
}).attr("d", arc);
arcs.transition()
.duration(duration)
.attrTween("d", arcTween);
sliceLabel = sliceLabel.data(donut(dataset), d => d.data.label);
sliceLabel.exit().remove();
sliceLabel.enter()
.append("text")
.attr("class", "arcLabel")
.attr("transform", function(d) {
  return "translate(" + (arc.centroid(d)) + ")";
})
.attr("text-anchor", "middle")
.style("fill-opacity", function(d) {
  if (d.value === 0) {
    return 1e-6;
  } else {
    return 1;
  }
})
.text(function(d) {
  return d.data.label;
});
 sliceLabel.transition()
.duration(duration)
.attr("transform", function(d) {
  return "translate(" + (arc.centroid(d)) + ")";
})
.style("fill-opacity", function(d) {
  if (d.value === 0) {
    return 1e-6;
  } else {
    return 1;
  }
});

I have a pie that I refactored to version 4 and I got it to run without errors but it no longer deletes segments. Other than changes I had to make to get it to run the pie is exactly the same as the version 3 one. 
version 4 pie
For reference, here is a working one in version three:
version 3

A:

You need to read up on the new merge method introduced in version 4.  You aren't using it but you need to:
arcs = arcs.data(donut(dataset), d => d.data.label);

arcs.exit().remove();

arcs = arcs.enter() //<-- save back to arcs variable
  .append("path")
  .attr("stroke", "white")
  .attr("stroke-width", 0.8)
  .attr("fill", function(d, i) {
    return color(i);
  })
  .attr("d", arc)
  .merge(arcs); //<-- merge enter with update

With that last line arcs is now enter + update without it arcs was just update.
Updated fiddle.

