I am trying to create a linear color scale for a heatmap. I want to color scale to go through a large set of specific colors, where the first color corresponds to the min of the
Use threshold scales. Here is a quick example:
coffee> d3 = require 'd3' coffee> color = d3.scale.threshold().domain([5,30,100]).range(["red","orange","green"]); coffee> color 6 'orange' coffee> color 3 'red' coffee> color 33 'green'