Create a pie chart with D3 and React. In my future project, I'd like to make pie charts from data.This is a good chance to prepare for it.I followed this steps to create a pie chart: Generate a function which can generate random data. Create a pie chart with an update function using React class. Create a pie chart with an update function using Hooks. Replace d3 functions with SVG elements. Improve a chart with attributes.