O'Reilly logo

Developing a D3.js Edge by Chris Viau, Andrew Thornton, Ger Hobbelt, Roland Dunn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3. The Reusable API

  • A walkthrough of a "Hello World" reusable component
  • A discussion of namespace, reusable module, closure, getters and setters

In the previous chapter we defined what the words module and plugin mean, at least in the context of JavaScript, D3.js and this book. We also defined what we mean when we say something is a reusable function, component or chart. We also referred to the Best Practices for D3.js as described by Mike Bostock in "Towards Reusable Charts". The principles outlined in that post are used in the D3.js core as well.

In this chapter we take a look at the implementation of these concepts in the form of a very ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required