title: Create a step scale in D3
body: <p>I have a basic scale looking like this:</p>
  
  <pre><code>        var yScale = d3.scale.linear()
            .domain([0, totalCount])
            .range([0, containerHeight]);
  </code></pre>
  
  <p>Now when I put something in it, like <code>yScale(6)</code>, it can return a float number, but I want it to return a number representing the row number in my grid. So, if the value is in some range, return <code>1</code>, if it's in another range, return <code>2</code> and so on. I suppose I need to calculate if the value is inside the range and return custom value.</p>
  
  <p>How can I do this?</p>