© Marcos Iglesias 2019
M. IglesiasPro D3.jshttps://doi.org/10.1007/978-1-4842-5203-1_2

2. An Archetypal D3.js Chart

Marcos Iglesias1 
San Francisco, CA, USA

In this chapter, we’ll learn about the example-based approach of learning and sharing D3.js code. We will review the canonical example that renders a bar chart. The code will serve as an illustration of what it is to work using a D3.js example as a jumpstart for your charts. We will learn about some of the standard code practices in the D3.js world and how they changed in the last versions.

Finally, we will analyze the example code critically, pointing out the drawbacks of its style and structure. We will see how it falls short when applying it to a professional software development context. ...

Get Pro D3.js: Use D3.js to Create Maintainable, Modular, and Testable Charts now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.