Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering data with react: pie

Public visualization

Viewing a saved revision (read-only)

e074b54f08834fde8d1e2addd7f9b475

Rendering data with react: pie

0 stars1🌍 Public
Rrayking99
Last edited Jun 10, 2021
Created on Jun 10, 2021

A pie chart displays the colors from the CSS color names dataset, with each slice representing a color category. The chart is rendered as an SVG using React and D3, where the `d3.pie` function computes the arc angles and `d3.arc` constructs the path for each slice. The data is loaded asynchronously from a CSV file via `d3.csv`. The code maps each data row to a pie slice, filling it with the corresponding hex value from the dataset.

AI-generated description