Skip to main content
100%

Fork of pie chart

✓ Published1🌍 Public
AAmrit Adhikari
Last edited Oct 27, 2025
Created on Oct 27, 2025
Forked from pie chart

This fork of a pie chart shows product sales distribution for a selected year, with a dropdown menu to switch between 2018 and 2024 data. The D3 v7 code loads CSV data via `d3.csv`, uses `d3.pie()` and `d3.arc()` to generate SVG slices, and renders percentage labels for segments larger than 5%. A color scale maps product names to slices, and a legend lists each product alongside its color swatch. The chart updates in place by clearing and redrawing the SVG on each year selection.

AI-generated description
MIT Licensed

Similar vizzes