🌍 Public
Viewing a saved revision (read-only)
56665e5d33d449d7b4605be4e14c87fe
Task9_Question1
A pie chart displays the distribution of ratings across different genres, with each slice labeled by its percentage and a color-coded legend listing the genre names. The visualization loads genre and rating data from a remote CSV file and renders it as an SVG using D3 v7. The code uses `d3.pie` to compute slice arcs, `d3.arc` to generate the path geometry, and `d3.scaleOrdinal` with `schemeCategory10` for slice colors. Percentage labels are placed at slice centroids via the arc generator's `centroid` method.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.