Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var max = _.max($(row).children('td').map(function(iter,cell){ return $(cell).text().replace(/,/g,'') }))
var min = _.min($(row).children('td').map(function(iter,cell){ return $(cell).text().replace(/,/g,'') }))
var color = d3.scale.linear()
.domain([min, max])
.range(["#c33", "#0fc"]);
$(cell).css('background-color', color($(cell).text().replace(/,/g,'')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.