The only thing better than a nice, interactive D3 widget is one that’s mobile friendly. There are a variety of ways (using Javascript / CSS) to achieve this responsiveness. Here’s the way I do it when I’m making a visualization (no jQuery required):
You can call this function when you add your SVG element to the page:
And for completeness, here’s a working example with a randomly updating donut chart — try shrinking your browser window to see it adapt :)