Skip to main content
100%

Rendering Data with React & D3

✓ Published1🌍 Public
Gguptambergatech
Last edited Jan 9, 2022
Created on Jan 6, 2022

This example shows a full-screen smiley face rendered as a donut chart, with each slice colored by a hex value loaded from a remote CSV file. The React component uses the `useState` and `useEffect` hooks to fetch the data via `d3.csv`, then applies `d3.pie` and `d3.arc` to generate SVG path elements. The face’s features are implied by the circular pie layout, with the inner radius set to zero and the outer radius matching the viewport width.

AI-generated description

Smiley face implementation with React.

MIT Licensed

Similar vizzes