title: How to use D3 scale to convert a continuous domain to a range of ordinal dates?
body: <p>I've got a continuous set of values from 0 to 1, and would like to map this in the most convenient way to my data, which has 365 dates (each one is formatted as "%Y-%m-%d"). It seemed simple enough before I got started, or maybe it's way too late to be using my head, but I'm getting nowhere. </p>
  
  <p>I've tried</p>
  
  <pre><code> d3.scale.linear()
           .domain([0,1])
           .range(d3.extent(data, function(d) {return d.date;})); 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>d3.time.scale()
         .domain([0,1])
         .range(d3.extent(data, function(d) {return d.date;})); 
  </code></pre>
  
  <p>both of which give output like <code>1423737864000</code> (although, at least, this number varies depending on the scale's input). </p>
  
  <p>I've also tried </p>
  
  <pre><code>d3.scale.ordinal()
          .domain([0,1])
          .range(d3.extent(data, function(d) {return d.date;})); 
  </code></pre>
  
  <p>but this only gives me my first date, <code>Thu Jan 01 2015 00:00:00 GMT-0500 (EST)</code> as output, irrespective of inputs.</p>
  
  <p>Basically, instead of using <code>d3.time.scale.domain()</code> with dates and  <code>d3.time.scale.domain()</code> with values, can I using <strong>values</strong> in the domain and the <strong>dates</strong> that I've got in my data as the range?</p>
  
  <p><strong>EDIT</strong> does it help that I've got the dates arranged in order, beginning with Jan 1 and ending with Dec 31?</p>