Hierarchical Layouts of D3

Part of the process of learning to do cool things with D3 is looking at examples on bl.ocks.org. This is great, as you have a living, forkable code base that you can modify into something specific to your use case, but part of what makes learning D3 difficult is that quite often, these rely on layouts, which are effectively algorithms that restructure data in a certain way. These can seem really opaque if you don't know how they work.

D3 v4 alert! Everything in this and the next chapters has changed significantly with D3 v4. Now more than ever, make sure that you pay attention to which version of D3 an example uses when looking at them online.

Over the course of the next two chapters, we'll be diving into layouts and building a ludicrous number of quick charts. First, we start with hierarchical layouts, which assumes a data structure with parent and child nodes; in the next chapter, we'll look at some of the other layouts, which include things such as pie charts and force-directed diagrams. Let's begin.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset