Skip to main content
100%

Untitled

✓ Published0🌍 Public
AAkshay U
Last edited Jul 17, 2023
Created on Jul 17, 2023
Forked from D3 Starter

This example shows a donut chart with eight categorical slices, each labeled with a letter from "a" to "h" and connected to its slice via thin polylines. The chart uses dummy data defined as an object of key-value pairs, with slice colors mapped through `d3.scaleOrdinal` and the `d3.schemeDark2` palette. It computes arc paths using `d3.pie` and `d3.arc`, with a half-radius inner hole, while labels and leader lines are positioned via a second outer arc and centroid calculations. The visualization is rendered as SVG with semi-transparent slices and white stroke separations.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes