title: Set D3 ticks dynamically based on data range
body: <p>Is there a way to dynamically set <code>ticks</code> on a D3 axis based on the current data set. The issue that I'm running into is that my time range (x-axis) can vary widely. For some datasets it is several years worth, for others a couple months, and in some cases just milliseconds. I currently have this set for <code>ticks</code>:</p>
  
  <pre><code>.ticks(d3.time.month, 3)
  </code></pre>
  
  <p>...which displays every third month. This is a nice quarterly axis for data spanning many months or years. However in cases where the data only ranges over a couple weeks, days, or even seconds nothing appears on my axis labels.</p>