Activity7
✓ Published0🌍 Public
This example displays a pie chart of Spotify top songs, showing the market share distribution of different artists. The chart is rendered as an SVG with D3 v6, using `d3.pie()` to compute arc segments and `d3.scaleOrdinal` with the `schemeCategory10` color palette to distinguish artists. A legend with colored dots and artist names annotates the chart, while the data is loaded from a remote CSV file via `d3.csv()`. The code also appends axis-style labels for "Market Share Distribution" and "Market Share (%)", despite pie charts typically lacking axes.
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.
MIT Licensed