Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering data with react

Public visualization

Viewing a saved revision (read-only)

fb8e423225224ec98d15fba82a817135

Fork of Rendering data with react

0 stars1🌍 Public
SSamirAhma
Last edited Nov 24, 2022
Created on Nov 24, 2022

This example displays the full set of CSS named colors as a pie chart, where each slice represents one color and is filled with its corresponding RGB hex value. The visualization loads data from a CSV file using D3’s `csv` utility, while React manages the asynchronous data fetching through `useState` and `useEffect`. The pie layout and arc paths are generated with `d3.pie` and `d3.arc`, rendered as SVG elements within React’s declarative component structure.

AI-generated description

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