Search code examples
matrixd3.jsrect

generate matrix-like graph with d3.js


I have a matrix, each cell has an RGB value. I want to project that matrix onto a corresponding rectangular graph, based on each matrix cell's RGB value. What's the best way to do this?


Solution

  • I created an example of how to create a grid in d3.js at http://bl.ocks.org/2605010. It includes the code to color the cells by setting the fill.