Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Donut Chart v2 - Le bon qui fonctionne

Public visualization

Viewing a saved revision (read-only)

8c697e0c3c1b45ea8c32271adff6693e

Fork of Donut Chart v2 - Le bon qui fonctionne

0 stars0🌍 Public
SSuzie1022susu
Last edited Jan 31, 2023
Created on Jan 31, 2023

This example shows the distribution of language popularity as a donut chart, aggregating the six largest categories into labeled slices and grouping all remaining categories into a single "others" slice. It uses d3.pie and d3.arc to generate the SVG paths, with an ordinal color scale from d3-scale-chromatic (schemeDark2) for slice fills. Labels and connecting polylines are positioned using outerArc.centroid and conditional text-anchor logic based on mid-angle, with data loaded from data.json via d3.json.

AI-generated description

Un exemple pour le TP.