Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

quality area chart

Public visualization

Viewing a saved revision (read-only)

60c9ad51549342b981fd3e941ec4f7c6

quality area chart

0 stars0🌍 Public
Sshivadeclare2@gmail.com
Last edited Jul 13, 2024
Created on Jul 13, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.