Skip to main content
100%

Assignment7 Pie Chart2

✓ Published0🌍 Public
445.saiful@gmail.com
Last edited Mar 30, 2026
Created on Mar 30, 2026
Forked from D3 Starter

This pie chart displays the proportion of fruit sales from a small CSV dataset, with five colored slices representing Apples, Bananas, Cherries, Dates, and Elderberries. Each slice is labeled with the fruit name using D3’s `pie()` and `arc()` generators, with the `scaleOrdinal` color scale providing distinct hues. The SVG is rendered at 960 by 500 pixels, and labels are positioned along a separate label arc via `labelArc.centroid()`. Data is loaded asynchronously using D3’s `csv()` function, with error handling logged to the console.

AI-generated description
MIT Licensed

Similar vizzes