All examples By author By category About

curran

Dynamic Size

This example shows how to make a D3 visualization that fills up the size of the page at the time it is loaded. This is necessary when, for example, you want to be able to load your visualization into an iFrame that could be any size. This example was created to address this question on the D3 Google Group: Any advice for setting width in iframes with D3?.

Here's a variant that responds to resize.