INNER CODE UNIT · JavaScript
cccmap
hms-dbmi/scde · web/pathcl.js:736
var cccmap= function(d) { return d; };
if(data.hasOwnProperty('domain')) {
var color = d3.scale.linear()
.domain(data.domain)
.range(data.colors);
cccmap= function(d) { return color(d); };
};
rect.attr("x", function(d, i) {
return x(i % cols);
})
.attr("y", function(d, i) {
return y(Math.floor(i / cols));
})
.attr("width", x(1))
.attr("height", y(1))
.attr("fill", cccmap);
svg.append("rect").attr('x',0).attr('y',0).attr('width',width).attr('height',height).attr('style','fill:none;stroke:black;stroke-width:0.5;');