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.