title: How do I draw a percentage from baseline?
body: <p>I'm looking to draw a simple line chart based off of each data point's distance from the mean. (% above, below, etc). I'm modeling it off of <a href="https://bl.ocks.org/mbostock/c69f5960c6b1a95b6f78" rel="nofollow noreferrer">this</a></p>
  
  <p>The two problems that I can't seem to figure out-
  Why isn't my line drawing? I've been through each line and can't seem to figure it out.</p>
  
  <p>Secondly, How do I take out the off- scaling on the y-axis? None of the scalings seems to be abnormal and I can't fix it. I assume it has to do with the scaling.</p>
  
  <pre><code>var x = d3.time.scale()
  .range([0, width]);
  
  var y = d3.scale.log()
  .range([height, 0]);
  
    x.domain(d3.extent(data, function(d) { return d.date; }));
    y.domain(d3.extent(data, function(d) { return d.ratio; }));
  </code></pre>
  
  <p><a href="https://codepen.io/lahesty/pen/pOgbwe?editors=1111" rel="nofollow noreferrer">Here's my CodePen</a></p>
  
  <p>What might I be missing? I assume it's something I just haven't learned about d3 yet. Thanks so much!!</p>