title: Remove text via D3
body: <p>I'm attempting to update a graph based upon some dynamic data/user input on the page. Since the data is simply placed at the base of a bar graph's column and doesn't need to move, I don't think I need any animation. Simply need to remove the current text and replace with the new values. </p>
  
  <p>The code below was my best guess, however it doesn't seem to be doing the trick. The <code>.append()</code> works fine, however it simply overlays the new text over the old, and it eventually just becomes unreadable (obviously). Seems like it's the <code>.remove()</code> that I'm using improperly.  </p>
  
  <p>Relatively new to D3.js so if there's a better way/anyone has any hints/tips they'd be appreciated. </p>
  
  <p><strong>EDITED per comments</strong></p>
  
  <pre><code>        //Remove the old text
          this.options.barDemo.selectAll("text.eoyValue")
              .data(data)
              .exit().remove();
  
          //Replace with the new text           
          this.options.barDemo.selectAll("text.eoyValue")
              .data(data)
              .enter().append("svg:text")
              .attr("x", function(d, i) { return x(i + .35) + barWidth; })
              .attr("y", height - 10)
              .attr("dx", -barWidth / 2)
              .attr("dy", "15px")
              .attr("text-anchor", "middle")
              .attr("style", "font-size: 12; font-family; Helvetica, sans-serif")
              .text(function(d) {
                  console.log(d.attributes.contract);
                  return d.attributes.contract;
              })
              .attr("transform", "translate(0, 18)")
              .attr("class", "eoyValue");
  </code></pre>