Skip to main content
100%

Pie charts labels

✓ Published0🌍 Public
Aaltocumulus
Last edited May 25, 2016
Created on May 25, 2016

This donut chart displays categorical data with labels connected to each slice by thin polyline leaders. A "randomize" button triggers smooth transitions between datasets. The visualization uses D3 v3's `d3.layout.pie` and `d3.svg.arc` to compute slice geometry, while `transition.attrTween` animates changes in slice paths, label positions, and connector endpoints. Labels alternate between left and right alignment depending on their angle, and the SVG rendering includes distinct groups for slices, labels, and lines.

AI-generated description

This variation of a donut chart demonstrates how to add labels with lines. Clicking on the button changes the displayed data. Check Pie Chart with Labels and Missing Data to see how to handle transitions with missing/new data.

forked from <a href='http://bl.ocks.org/dbuezas/'>dbuezas</a>'s block: <a href='http://bl.ocks.org/dbuezas/9306799'>Pie charts labels</a>

Similar vizzes