block by curran 735c8063f00c773ef1dea78f62a321fa

Margin Convention II with ReactiveModel

Full Screen


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

This example shows a variation of Margin Convention with ReactiveModel that encapsulates functionality using “reactive mixins” and reactiveModel.call. This demonstrates how property definitions and pieces of reactive behavior can be organized and potentially split off into separate modules. The purpose of this is to allow common patterns used by many data visualizations to be encapsulated as reusable modules, allowing the complexity of visualizations to grow while still being manageable and well organized. The model.call(fn) method was added in release v0.7.0, inspired by call() in d3-selection.

See also

web counter

index.html