Pie Chart Update, II
A donut chart displays two metrics—apples and oranges—for a set of categories. The chart animates between the two datasets when a radio button is selected or after a two-second automatic switch. The code uses `d3.layout.pie` to compute angles, `d3.svg.arc` for the donut shape, and `transition.attrTween` with an interpolated arc function to smoothly update the paths’ rendered angles. Data is loaded from a TSV file with `d3.tsv`.
AI-generated descriptionThis variation of a donut chart demonstrates how to update values with an animated transition. Clicking on the radio buttons changes the displayed metric.
Next: Missing Data<br> Previous: Static Update
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/1346410'>Pie Chart Update, II</a>