Skip to main content
100%

Pie Chart Artistes

✓ Published2🌍 Public
AAnissa Belkelfa
Last edited Nov 30, 2022
Created on Nov 29, 2022

A donut chart breaks down music genres by count, with each slice labeled and colored to show the proportion of artists per category. The visualization uses D3’s `pie` and `arc` generators to compute slice geometry and paths, while `scaleOrdinal` maps genre names to a custom color palette from `d3-scale-chromatic`. Hovering over a slice reveals a tooltip with the exact percentage, calculated using `sum` over the CSV data. The code reads from `data.csv` and renders the chart as SVG elements with mouseover and mouseout event handlers.

AI-generated description
MIT Licensed

Similar vizzes