🌍 Public
Viewing a saved revision (read-only)
60c9ad51549342b981fd3e941ec4f7c6
quality area chart
This example shows a pie chart of Spotify Top 50 song genres, with each slice labeled by its percentage of the total and accompanied by a color-coded legend. Using D3 v6, it fetches CSV data from a GitHub gist, aggregates genre counts with `d3.rollup`, and generates arcs via `d3.pie` and `d3.arc`. The SVG rendering applies a `d3.scaleOrdinal` with `d3.schemeSet3` for colors and positions percentage labels using `arc.centroid`.
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.