title: Creating an axis with absolute value in d3
body: <p>I have created a bar chart with negative values in d3. The chart displays the difference in score between two teams over a series of games so if Team A won by three points over team B, the data point is -3. If Team B won by three, the data point is 3.</p>
  
  <p>The graph itself is fine but I would like the axis to reflect the absolute value of the data point. I tried:</p>
  
  <pre><code>var xAxis = d3.svg.axis()
      .scale(Math.abs(x))
      .orient("top");
  </code></pre>
  
  <p>but that didn't seem to do the trick. Any ideas are welcomed.</p>
  
  <p>Thanks,
  Jon</p>