🌍 Public
Viewing a saved revision (read-only)
3bb5a5cb7b504a87acef5ee8cd8552a7
Fork of Rendering data with React & D3
This example displays a pie chart of CSS named colors loaded from a CSV file, with each slice filled by its corresponding RGB hex value. The visualization uses React hooks (useState, useEffect) to fetch the data via d3.csv and manage the loading state, while d3.pie and d3.arc compute the slice geometry. Each slice is rendered as an SVG path element controlled by React’s declarative JSX syntax. The chart uses an outer radius equal to the full width, creating a semicircular donut shape.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities and uses React state to render the data.