Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Donut Chart v2 - Le bon qui fonctionne

Public visualization

Donut Chart v2 - Le bon qui fonctionne

0 stars6🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed