title: How to modify a domain dealing with dates in d3.js?
body: <p>I am studying this example: <a href="https://bl.ocks.org/d3noob/2505b09d0feb51d0c9873cc486f10f67" rel="nofollow noreferrer">https://bl.ocks.org/d3noob/2505b09d0feb51d0c9873cc486f10f67</a>
  made by d3noob and I realized that the first and the last dot are partially in the margins. I am wondering how to make a buffer on each side of the x.domain in order to keep the dots away from the margins. </p>
  
  <p>I believe that the line responsible of this is the following:</p>
  
  <pre><code>x.domain(d3.extent(data, function(d) { return d.date; }));
  </code></pre>
  
  <p>I tried to modify this line with d3.min and d3.max but this doesn't seem to work as the x axis is dealing with dates.</p>