score:1

Accepted answer

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

var canvas = d3.select('#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: https://bocoup.com/weblog/d3js-and-canvas/


Related Query

More Query from same tag