title: How to exit().transition rects under a col in d3
body: <p>I have a stacked bar chart that shows values either for month or year.</p>
  <p>It is composed of a series of columns (1 or 12), and rects within each column (9 individual values).</p>
  <p>You can see it here: (Note - this is a valid web page, currently running on AWS.)</p>
  <pre><code>http://54.245.225.47/stackedbar_ex_good
  </code></pre>
  <p>When I go from months to year view, I want to move all the positions to the yearly value, then fade them out as the year values <code>.enter()</code>.</p>
  <p>The problem is that the rects (where I would normally do the <code>.exit().transition().attr(&quot;y&quot;, new_val)</code> never gets called since the column gets deleted (<code>.exit()</code>). And when I tried referencing the child <code>.rects</code> from the <code>svg.selectAll(&quot;.col&quot;).exit().transition()</code>, they seemed to disappear all at once. I'm guessing this is the wrong way.</p>
  <p>Sorry this is so confusing!  I'm sure this sort of thing is answered elsewhere, but I don't even know the language to describe it properly (and hence search for it). Any tips / pointers would be appreciated.</p>
  <p>(There is a lot of code - I don't know how to simplify in order to even post it.)</p>