Skip to main content
100%

PieChart-D3

✓ Published1🌍 Public
Kkblikitha22@gmail.com
Last edited Apr 4, 2025
Created on Apr 4, 2025
Forked from Hello VizHub

A pie chart displays the distribution of fruit categories from a CSV file, with each slice labeled and a corresponding color legend. The chart is rendered as SVG using D3 v7, with the pie layout created via `d3.pie` and `d3.arc`, and colors assigned through `d3.scaleOrdinal` with `d3.schemeCategory10`. Data is loaded asynchronously with `d3.csv`, and slice labels are positioned using `arc.centroid`. The legend is built manually by appending colored rectangles and text elements.

AI-generated description
MIT Licensed

Similar vizzes