Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var column = $('#teams_standard_batting td:nth-child(19)')
max = _.max(column.map(function(){ return parseFloat($(this).text()) }))
min = _.min(column.map(function(){ return parseFloat($(this).text()) }))
var color = d3.scale.linear()
.domain([min, max])
.range(["#c33", "#0fc"]);
column.map(function(iter,cell){
return $(cell).css('background-color', color(parseFloat($(cell).text())))
})
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.