d3.js heatmap function moved out of AngularJS controller into the global scope
Heatmap: calculate color quantile based on real calculations of min, median, and max
Heatmap: replace and update references to undefined variables