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)

1906f488d30d411fa02fbb39b3959a32

Fork of Rendering Data With REACT

0 stars1🌍 Public
Nnkarinti
Last edited Jun 30, 2023
Created on Jun 30, 2023

This example visualizes a dataset of CSS named colors as a pie chart, where each slice corresponds to a color and is filled with its hex value. The visualization is built using React and D3, with D3’s `csv` utility loading the data from a remote URL. React state manages the asynchronous data loading, while D3’s `pie` and `arc` functions compute the slice geometry. Each slice is rendered as an SVG `path` element inside a `<g>` transformed to the chart’s center.

AI-generated description

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