D3js and CanvasJS belong to Charting Librariescategory of the tech stack. The most important reason people chose D3js is. More on that in a bit.
D3 charts are most often rendered using SVG a retained mode graphics model which is easy to use but performance is limited.
To create the SVG with the D3js lets look at the following illustration. However there other differences between Canvas and SVG in relation to D3 mentioned below. D3js is an scripting framework for drawing graph. The dimensions must be set dynamically because they change on zoom.