Chapter 9. Lay Them Out
In this chapter, we will cover:
- Building a pie chart
- Building a stacked area chart
- Building a treemap
- Building a tree
- Building an enclosure diagram
Introduction
The D3 layout is the focus of this chapter-a concept we have not encountered before. As expected, D3 layouts are algorithms that calculate and generate placement information for a group of elements. However, there are a few critical properties worth mentioning before we dive deeper into the specifics:
- Layouts are data: Layouts are purely data centric and data driven; they do not generate any graphical or display-related output directly. This allows them to be used and reused with SVG or canvas or even when there is no graphical output.
- Abstract and reusable: Layouts are ...
Get Data Visualization with D3 4.x Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.