Mastering D3.js
上QQ阅读APP看书,第一时间看更新

Chapter 2. Reusable Charts

In this chapter, we will learn how to create configurable charts and layout algorithms and how to use these components. One important characteristic of configurable charts is that we can use them in different contexts without having to change the code. In this chapter, we will cover the following topics:

  • Learn how to create reusable charts
  • Create a reusable barcode chart
  • Create a reusable layout algorithm
  • Use the layout and the barcode chart

We will begin by defining what we understand by reusable charts and construct a reusable chart from scratch.