title: removing d3 legend items failing
body: <pre><code>  var updateChart = function (dataset) {
  
      var legendG = svg.selectAll(".legend")
         .data(donut(dataset), function (d) {
             return d.data.label;
         })
         .enter().append("g")
         .attr("transform", function (d, i) { return "translate(" + (width - 350) + "," + (i * 15 + 20) + ")"; })
         .attr("class", "legend");
  
      legendG.exit().remove();
  
      legendG.append("rect")
        .attr("width", 10)
        .attr("height", 10)
        .attr("fill", function (d, i) {
            return color(i);
        });
  
      legendG.append("text")
        .text(function (d) {
            return d.data.label;
            //+ ' ' + d.data.callState;
        })
        .style("font-size", 12)
        .attr("y", 10)
        .attr("x", 11)
        .attr("width", 100);
  
      arcs = arcs.data(donut(dataset), function (d) { return d.data.label });
  
      arcs.exit().remove();
  
      arcs = arcs.enter()
        .append("path")
        .attr("stroke", "white")
        .attr("stroke-width", 0.8)
        .attr("fill", function (d, i) {
            return color(i);
        })
        .attr("d", arc)
        .merge(arcs);
  
      arcs.transition()
        .duration(duration)
        .attrTween("d", arcTween);
  
      sliceLabel = sliceLabel.data(donut(dataset), function (d) { return d.data.label });
  
      sliceLabel.exit().remove();
  
      sliceLabel = 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.value;
        })
        .merge(sliceLabel);
  
      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;
            }
        });
  
  
  };
  </code></pre>
  
  <p>This is my update code for a real time pie chart written in version 4 of d3.  the pie adds and removes new and old data fine.  the legend seems not to be removing old data.  it does seem to add new data OK.  All of the code for the legend is in the updateChart function. Am I missing something?  Here is a sample fiddle:<a href="https://jsfiddle.net/jwaldner/x09v4g5k/3/" rel="nofollow noreferrer">broken exit()</a></p>