🌍 Public
Fork of Loading Data with React & D3
This example displays a rainbow of CSS named colors as a semicircular pie chart, with each color represented by a slice. The visualization loads data from a remote CSV file containing color names and hex values using D3’s `csv` utility, manages loading state with React’s `useState` and `useEffect`, and renders the result as SVG paths. The chart is generated with a D3 `arc` generator, mapping each data row to a `path` element filled with the corresponding hex value.
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
Comments
Sign in to join the discussion.