🌍 Public
Viewing a saved revision (read-only)
c1b3c01f9a2f4c4fa066bfb2811259df
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.