Skip to main content
100%

Lendo dados com React & D3

✓ Published0🌍 Public
DDiego Mariano
Last edited Mar 4, 2022
Created on Mar 4, 2022

This example shows a donut chart of CSS named colors, where each color is represented by a wedge filled with its own RGB hex value. The visualization loads color data from a CSV file using D3’s `csv` utility and manages the asynchronous data with React’s `useState` and `useEffect` hooks. Each wedge is rendered as an SVG `path` computed with D3’s `arc` generator, using angles proportional to the data index. The chart appears inside a React component that displays a loading message until the data arrives.

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.

MIT Licensed

Similar vizzes