title: D3.js Line chart with relative min and max in Y axis
body: <p>Consider the following VND3 line graph: <a href="http://jsfiddle.net/tramtom/hfv68yan/" rel="nofollow">http://jsfiddle.net/tramtom/hfv68yan/</a> </p>
  
  <p>The graph plots the line ok, however most of my data is the static over long periods, and the two series will always have one at the top of the graphic and other on the bottom axis.</p>
  
  <p>How to create relative minimum and maximums for the Y axis in a way that lines for the series be almost in the middle or at least spaced so that the lower valued series does not lie almost entirely on the x-axis. </p>
  
  <p>Need to add 100 units below the minimum and 100 units above the maximum so the lines don't be at the top or bottom of the graphic.</p>
  
  <p>I tried setting a domain and range values like in here <a href="http://jsfiddle.net/tramtom/hfv68yan/1/" rel="nofollow">http://jsfiddle.net/tramtom/hfv68yan/1/</a> but have no effect</p>
  
  <pre><code>var yScale = d3.scale.linear()
  .domain([
       d3.min(data, function (d) {
           return d.y;
       }) - 100,
       d3.max(data, function (d) {
           return d.y;
       }) + 100
  ])
  .range([
       d3.min(data, function (d) {
           return d.y;
       }),
       d3.max(data, function (d) {
           return d.y;
       })
  ]);
  </code></pre>