Accepted answer

The example is not using canvas. It has just used a variable named canvas to refer to the outer div.

var canvas ='#wrapper')

It is just about possible to use d3 with canvas, but highly irregular, and pretty far removed from the intention of d3 which is in essence, a specialised data to graphic dom manipulation library.

n.b. an article about using d3 with canvas:

Related Query

More Query from same tag