Book Image

Mastering D3.js

Book Image

Mastering D3.js

Overview of this book

Table of Contents (19 chapters)
Mastering D3.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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.