O'Reilly logo

D3.js in Action by Elijah Meeks

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

Chapter 10. Writing layouts and components

This chapter covers

  • Writing a custom legend component
  • Writing a custom grid layout
  • Adding functionality to make layout and component settings customizable
  • Adding interactivity to components

Throughout this book, we’ve dealt with D3 components and layouts. In this chapter we’ll write them. After you’ve created your own layout and your own component, you’ll more clearly understand the structure and function of layouts. You’ll also be able to use that layout, and other layouts that you create on your own later, in the charts that you build with D3.

In this chapter we’ll create a custom layout that places a dataset on a grid. For most of the chapter, we’ll use our tweets dataset, but the advantage ...

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