title: D3's data update not functioning as expected
body: <p>After calling my rects.enter().append(), my rects.attr() is not setting values for the newly appended values.</p>
  
  <pre><code>let rects = svg.selectAll('rect')
      .data(data)
  
  //On update Only
  rects.attr('fill', 'black')
  
  //On enter ...
  rects.enter()
      .append('rect')
      .style('fill', 'maroon')
  
  //On update AND enter
  rects
      .attr('x', (d, i)=&gt;i*(barWidth+padding))
      .attr('y', d=&gt;height - bar_height(d.value))
      .attr('width', barWidth)
      .attr('height', d=&gt; bar_height(d['value']))
  </code></pre>
  
  <p>Basically, my understanding is in the comments. If I haven't called enter(), it will only apply changes to previous values in data. This simply should have the bar be a different color. Then I enter() and change the color to the new ones added, and finally, I expect that now that all are inside rects so to speak, it should update the attributes of all of them.</p>
  
  <p>The problem is that the final attributes are only being set to those values that weren't appended, so first pass nothing is being drawn, then the second pass it's being drawn as an update. </p>
  
  <p>I tried basing my changes on <a href="https://stackoverflow.com/questions/38065997/d3-js-attribute-setting-not-working-after-binding-data-and-entering-elements">this</a>, and that's where I'm at.</p>