title: Normalize numbers to 100 using D3 range?
body: <p>I'm trying to take a given array of numbers and normalize them be 0-100.</p>
  
  <p>Clearly I'm doing something wrong here, but I can't for the life of me figure it out.  Someone please help me find my dumb mistake?</p>
  
  <pre><code>var arr = [6345, 45678, 34572, 59867, 23517, 20938, 9872345, 2986];
  
  arr.sort();
  
  var scale = d3.scale.linear().domain([0, arr[0]]).range([0, 100]);
  
  for ( var i in arr ){
      console.log(scale(arr[i]));
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/Troop4Christ/8jzFq/" rel="noreferrer">jsFiddle</a></p>