title: How to transition D3 axis without tick text attribute reset?
body: <p>I have a D3 project where I'm drawing a time axis along the left side of the screen. I want to have it smoothly transition on window resize so I'm using D3 transitions. However the axis setup appears to be changing the "dy" attribute on the tick labels immediately causing the tick labels to jump downward and then transition back into their normal place any time the SVG is transitioned. Is there any way to set the "dy" attribute of the tick text as part of the axis call or a better way to transition?</p>
  
  <p>My initial (one-time) axis setup:</p>
  
  <pre><code>var timeScale = d3.time.scale().domain([minTime, maxTime]);
  var yAxis = d3.svg.axis().scale(timeScale).tickFormat(d3.time.format("%-m/%-d %-I:%M%p")).orient("right");
  </code></pre>
  
  <p>I have a function to update/transition the SVG elements I'm using. The first time the SVG is drawn init is set to true, false afterwards.</p>
  
  <pre><code>function updateSVG(init) {        
      ...
      timeScale.rangeRound([topPadding, svgHeight]);
      // Use a transition to update the axis if this is an update
      var t = (init) ? svgContainer : svgContainer.transition().duration(750);
      // {1}: Create Y axis
      t.select("g.axis").call(yAxis);
      // {2}: Move Y axis labels to the left side
      t.selectAll("g.tick &gt; text")
          .attr("x", 4)
          .attr("dy", -4);
      ...
  }
  </code></pre>
  
  <p>On an update at {1} tick labels all have a "dy" attribute of "-4" from the previous attr() call. At {2} applying the axis resets the "dy" attribute of these elements to a default of ".32em" after which they transition slowly back to "-4" causing them to jitter up and down as the window is resized and the axis is redrawn. </p>
  
  <p>Here is a working JSFiddle that demonstrates the jump on the y-axis when the Result box is resized, resize just by a few pixels and it should be obvious: <a href="http://jsfiddle.net/YkDk4/1/" rel="nofollow">http://jsfiddle.net/YkDk4/1/</a></p>