I'm using d3.scale.threshold() to achieve color change that is correlated with a value, and I'm not sure how to flip colors, so that bar chart that is completely red will be positioned on the bottom of the chart, and bar chart that is mostly green is positioned on the top.
This is my Plunker.
Right now very top bar chart is completely red and positioned at the top. However, I would like it to see it on the bottom.
Any suggestions are appreciated.