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 stars1🌍 Public
Ssagayous
Last edited Apr 10, 2023
Created on Apr 10, 2023

A donut chart displays the popularity of 36 languages from a dataset, but only the top 5 are labeled individually; all remaining languages are aggregated into a single "others" slice. The visualization uses d3.pie and d3.arc to generate the SVG paths, with d3.scaleOrdinal and d3.schemeDark2 for color encoding. Labels and connecting polylines are positioned using arc.centroid and a computed mid-angle, with text anchored left or right based on slice placement. Data is loaded via d3.json.

AI-generated description

Un exemple pour le TP.

Comments

Sign in to join the discussion.

MIT Licensed