Chapter 9. Interactive applications with React and D3

 

This chapter covers

  • Using D3 with React
  • Linking multiple charts
  • Automatically resizing graphics based on screen size change
  • Creating and using brush controls

Throughout this book, you’ve seen how data can be measured and transformed to produce charts highlighting one or another aspect of the data. Even though you’ve used the same dataset in different layouts and with different methods, you haven’t presented different charts simultaneously. In this chapter, you’ll learn how to tie multiple views of your data together using React. This type of application is typically referred to as a dashboard in data visualization terminology (an example of which will be built in this chapter, as shown in figure 9.1). You’ll need to create and manage multiple <svg> elements as well as implement the brush component, which allows you to easily select part of a dataset. You’ll also need to more clearly understand how data-binding and D3’s enter/exit/update pattern work so that you can effectively integrate D3 with external frameworks.

Figure 9.1. Throughout this chapter, we’ll build toward this fully operational data dashboard, first creating the individual chart elements (section 9.1), then adding interactivity (section 9.2), and finally adding a brush to filter the data (section 9.3).

9.1. One data source, many perspectives

9.2. Getting started with React

9.3. Traditional D3 rendering with React

9.4. React for element creation, D3 as the visualization kernel

9.5. Data dashboard basics

9.6. Dashboard upgrades

9.7. Brushing

9.8. Show me the numbers

9.9. Summary

D3 in the real world

sitemap