Skip to main content
100%

Pie Chart React & d3

✓ Published3🌍 Public
Kkbrookshire420
Last edited May 7, 2022
Created on May 7, 2022

A pie chart renders a color wheel from a CSV file of named colors, using React state to manage the asynchronous data loading. The static chart displays each color as an equally sized slice, with its fill set to the corresponding RGB hex value from the data. Built with React and D3 v7, the code uses `d3.csv` to fetch the data and `d3.pie` with `d3.arc` to generate the SVG paths. The visualization is rendered as an SVG element, centered on a 960x500 canvas.

AI-generated description

A program that loads in some data using d3 utilities, and uses react state to keep track of the data.

MIT Licensed

Similar vizzes