This example shows how to make a D3 visualization that fills up the size of the page at the time it is loaded AND whenever the page is resized by the user. This is necessary when, for example, you want to be able to load your visualization "full screen" and give users the ability to size the window however they want to. This example was created to address this question on the D3 Google Group: Any advice for setting width in iframes with D3?.
To experience the resize behavior, run this example full-screen and resize the browser.
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js