Could you compare this to raphael.js please?
Where D3 differs is in its focus. It's not just a graphics library, but a means of manipulating the DOM to facilitate data visualisation (often via SVG, but data-based manipulation of simple HTML elements is equally feasible).
This reliance on standards such as the W3C DOM and SVG APIs means that, unlike Raphael, there is minimal proprietary markup to learn, and it also brings a lot of flexibility and power: anything you can do with SVG and HTML you can wield with D3.
From the horse's mouth: http://vis.stanford.edu/files/2011-D3-InfoVis.pdf