Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie chart Test

Public visualization

Viewing a saved revision (read-only)

2842ad7f72a145508a73ef7e05eb7f9e

Fork of Pie chart Test

0 stars1🌍 Public
Ppeterwang6666
Last edited Dec 18, 2021
Created on Dec 13, 2021
Forked from Pie chart Test

This is an SVG pie chart that visualizes the percentages of white, black, and draw results from a dataset of 20,058 total records, with each slice labeled by its name and percentage. The chart uses D3 v6's `d3.pie` function to compute the arc segments and `d3.arc` to define both the path shapes and the text label positions, with a custom color scale (`d3.scaleOrdinal`) mapping values to a palette. The chart is centered within a large 4000x4000 SVG canvas, and the data is hardcoded in `index.js` rather than being loaded from the provided `data.csv` file.

AI-generated description