Fork of d3 and canvas - the bind, the draw and the pick
This example demonstrates a grid of colored rectangles, where each cell represents a data point and its color is mapped from its value using a spectral color scale. The visualization implements a picking mechanism for canvas-based interactivity by assigning each rectangle a unique, hidden color stored in a separate off-screen canvas. Using D3 v4, the code binds data to custom elements, then draws the visible grid with animations, while the hidden canvas enables precise hit-testing through color lookup, demonstrated with a tooltip.