This is an example of structuring D3 code using ES6 classes. For more information, see the accompanying blog post “A better way to structure D3 code”.
This example is written in ES6 and will only work in the latest versions of Chrome, Firefox and Safari.
Hey! Thanks for the example!
It'd be better to the
General Update Patterns
here.https://bl.ocks.org/mbostock/3808218
https://bl.ocks.org/mbostock/3808221
https://bl.ocks.org/mbostock/3808234