Skip to main content
100%

Question 1

✓ Published1🌍 Public
Tthokalarohith83@gmail.com
Last edited Mar 26, 2025
Created on Mar 26, 2025
Forked from HTML Starter

This pie chart visualizes fruit sales data, displaying the proportional share of each fruit category as a labeled slice with a corresponding legend. The chart is rendered as an SVG using D3 version 7, with the pie generator `d3.pie()` and arc generator `d3.arc()` calculating angular extents and centroids for labels. Data is loaded via `d3.csv` from a remote Gist, and the color scale `d3.scaleOrdinal` with `d3.schemeSet2` assigns categorical colors. The legend is built using `d3.select` and `enter()`, while sales values are cast to numeric type before creating the pie layout.

AI-generated description
MIT Licensed

Similar vizzes