Skip to main content
100%

Donut Chart v2 - Le bon qui fonctionne

✓ Published6🌍 Public
MMaeva B
Last edited Nov 15, 2022
Created on Sep 28, 2022

A donut chart displays the popularity of languages in a song dataset, aggregating all categories beyond the top five into an "others" slice. The visualization uses D3.js v4 to generate SVG paths for the pie slices, with labels and connecting polylines positioned using the `d3.arc` centroid functions. The chart colors slices via `d3.scaleOrdinal` with the `schemeDark2` palette. Data is loaded from a local JSON file, and the code computes the pie layout with `d3.pie`, limiting displayed categories to five before grouping the remainder.

AI-generated description

Un exemple pour le TP.

MIT Licensed

Similar vizzes