D3bind
D3bind is a library that brings model-view separation and observables to d3.js.
You can use the bundled library: d3bind.js, or install it with npm install d3bind --save
Examples can be found here: code, demo
See the wiki for more explanation.
Hello world example
var model = d3bind;var parent = d3bind; parent;parent ;
Data binding
Instead of the data join mechanism of d3.js with the data, enter and exit functions, this library offers an alternative that uses an observable array model, and view bindings that automatically react to the changes in it.
var data = d3bind;var view = d3bind; view; viewtext'Insert random'; viewtext'Remove random'; view;
Logging
To debug the cascading changes of observables, switch on logging:
d3bindlogging = true;
Licensing
Released under The MIT License.