title: D3.js: Changing the color of the bar depending on the value
body: <p>I have been experimenting with d3.js bar chart, I want to change the color depending on the value of the y axis, how do I achieve this. I tried adding linear gradients but then I lose control over it. </p>
  
  <p>The code I am working on is based on this: <a href="http://bost.ocks.org/mike/bar/" rel="noreferrer">http://bost.ocks.org/mike/bar/</a></p>