🌍 Public
Viewing a saved revision (read-only)
0d0e82bf61a34147a66c7ccd4b1c3ba0
Activity7-Q1
This interactive pie chart visualizes total movie ratings by genre, with a legend and tooltip for detailed values. The code uses D3.js v7, loading CSV data and aggregating it with `d3.rollup` and `d3.sum`, then generating arcs via `d3.pie` and `d3.arc`. A tooltip appears on mouseover, and the SVG is styled with CSS, featuring a color scale using `d3.scaleOrdinal` with `d3.schemeCategory10`. The chart is centered with extra space allocated for the legend, and the title explicitly states "Total Ratings by Genre."
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.