Dataviz 2020_Ep20 - 13. Pie Chart (with React and D3)
✓ Published1🌍 Public
MMinwoo Pak
Last edited Jun 13, 2021
Created on Jun 10, 2021
This example displays CSS named colors as a radial burst of equal-sized pie slices, with each slice filled by the color it represents. It loads data from a CSV file using D3’s `csv` utility, then uses D3’s `pie` and `arc` functions to compute and draw the SVG paths. React manages the state and rendering, with a `useEffect` hook fetching the data asynchronously and displaying a loading message until it arrives. The chart is centered within a 960 by 500 pixel SVG viewport, creating a full circular composition of the color spectrum.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses both React & D3 to render the data (as a radial burst).
MIT Licensed