Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Fork of rendering data with react and d3

Public visualization

Fork of Fork of Fork of rendering data with react and d3

0 stars1🌍 Public
Mmeghshah612
Last edited Feb 19, 2022
Created on Feb 19, 2022

This example renders a pie chart of CSS color names loaded from a CSV file, with each slice filled by its corresponding RGB hex value. The code uses React hooks (`useState`, `useEffect`, `useCallback`) to fetch and store the data, then creates the chart with d3’s `pie` and `arc` functions. The SVG is rendered through ReactDOM, with the `pieArc` generator set to an outer radius equal to the chart width.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed