title: d3 js how to retrieve time from a x position
body: <p>I'm currently working on learning a little bit of the wonderfull d3.js library. Let's use a simple example for the purpose of my problem.</p>
  
  <p>I have a date that I want to represent on a x Axis.</p>
  
  <pre><code>    var startDate = new Date();
      var x         = d3.time.scale().range([0, 1000]); //range of x axis will be 1000px
  
      var xPos      = x(startDate); // return the scaled date as a x position on x axis
  </code></pre>
  
  <p>Here's the problem : 
  How do I get the original value from there ... in other words, how do I translate the x position as a date ? In other words again how do I get startDate from xPos ? </p>
  
  <p>Thanks for the help ! </p>