block by j0hnsmith 5591116

Pie Chart Update, III

Full Screen

I’m continuting mbostocks’s series of gists about pie charts.

This variation of a donut chart demonstrates how to add/remove slices or move between datasets of differing lengths with transitions. Clicking the radio buttons changes the displayed metric. Note how the new slice enters anticlockwise from the ‘end’ of the pie chart.

Previous: Animated transition. Next: Nice initial transition.

index.html