Skip to main content
100%

Rendering Data with React & D3

✓ Published1🌍 Public
TTaeyoung Ahn
Last edited Sep 4, 2021
Created on Aug 24, 2021

This example displays a pie chart of CSS named colors, with each slice filled using the color’s own RGB hex value. It loads the dataset via `d3.csv` and uses React’s `useState` and `useEffect` to manage asynchronous data fetching, rendering an SVG composed of `path` elements generated by `d3.pie` and `d3.arc`. The chart is centered within a fixed 960×500 viewport.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to render the data.

MIT Licensed

Similar vizzes