Skip to main content
100%

Fork of Pie chart Test

✓ Published1🌍 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
MIT Licensed

Similar vizzes