🌍 Public
Viewing a saved revision (read-only)
d07a4e5963084f52b7087f957d612873
Assignment-2_Question-1
This example presents a pie chart visualizing the distribution of genres from a CSV dataset, loaded via D3’s `csv` fetcher and mapped to numerical values from the “Less than 3” column. Using D3 v7, it constructs a 600x600 SVG with `pie()` and `arc()` to generate slices, colored by `scaleOrdinal` and labeled with values at each arc’s centroid. A legend and title are added, with a color range from orange to green. The reusable `createPieChart` function encapsulates the rendering logic.
AI-generated description