© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
E. ElromIntegrating D3.js with Reacthttps://doi.org/10.1007/978-1-4842-7052-3_3

3. Basic Charts: Part 1

Elad Elrom1  
(1)
New York, NY, USA
 
In the previous chapter, I covered what was possible with D3 and React. We created function and class components, and we even created a simple bar chart. In this chapter, I will be covering how to create simple charts with React and D3 using TypeScript as a type checker. I will be showing you how to create the following simple charts with the emphasis of getting D3 to do most of the work. I will be showing you how to create the following charts:
  • Line chart

  • Area chart

  • Bar chart

Let’s begin.

Setup

Just as in the previous chapters ...

Get Integrating D3.js with React: Learn to Bring Data Visualization to Life now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.