Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering Data with React & D3

Public visualization

Viewing a saved revision (read-only)

eb1ddd65604d42e0a512acf097804aad

Rendering Data with React & D3

0 stars1🌍 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.