Fork of Loading Data with React & D3
✓ Published1🌍 Public
This example displays CSS named colors as a full-circle pie chart, where each slice is colored with its corresponding hex value. It uses React hooks, specifically `useState` and `useEffect`, to asynchronously load the CSV data with D3’s `csv` function. The chart is rendered as SVG, with D3’s `arc` and `pie` generators computing the slice paths, and each path’s fill set from the `RGB hex value` column in the dataset.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.
MIT Licensed