🌍 Public
Fork of Loading Data with React & D3
This example displays a pie chart of CSS named colors, with each slice filled using its corresponding RGB hex value from the loaded dataset. The visualization uses React state and the `useEffect` hook to asynchronously fetch CSV data via `d3.csv`, then renders the chart as SVG paths. The pie layout is generated with `d3.pie()` and sectors are drawn using `d3.arc()`, with all geometry centered within a 960×500 viewport.
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.