Skip to main content
100%

Fork of Donut Chart v2 - Le bon qui fonctionne

✓ Published0🌍 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.

MIT Licensed

Similar vizzes