Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering data with React

Public visualization

Rendering data with React

0 stars0🌍 Public
SSemyon
Last edited Jul 4, 2021
Created on Jul 4, 2021

A donut chart displays the full spectrum of CSS named colors, each slice colored by its corresponding hex value. The visualization loads color data from a CSV file using `d3.csv` and manages the asynchronous data fetching with React's `useState` and `useEffect` hooks. React renders SVG paths calculated by D3's `pie` and `arc` generators, with the chart centered and sized to fit the viewport.

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.

Comments

Sign in to join the discussion.

MIT Licensed