block by curran 974c9def890f8ac0172611921fb51b8a

Responding to Resize with ReactiveModel

Full Screen


The data flow graph for this example (made with graph-diagrams).

This example shows how to make a dynamic graphic using D3 4.0 and ReactiveModel that fills its containing element and responds to resize. This is useful 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. It’s also useful when you want to use CSS to define the size of a visualization container, then have the visualization automatically fit inside it.

To experience the resize behavior, run this example full-screen and resize the browser.

Part of a series of examples demonstrating ReactiveModel.

Notes:

forked from curran‘s block: Responding to Resize

Built with blockbuilder.org

index.html