Skip to main content
100%

Pie Chart Update, V

✓ Published0🌍 Public
SSpaceActuary
Last edited Jun 5, 2017
Created on Jun 5, 2017

This example shows an interactive pie chart that updates its arc segments when the user selects a fruit type from radio buttons in a form. The chart displays regional fruit counts from a TSV data file, with each region represented by a colored path. The visualization uses `d3.layout.pie` to compute arc angles and `d3.svg.arc` for the donut shape. When a fruit changes, a data-join keyed by region enables smooth transitions via `transition.attrTween` and `d3.interpolate`, animating the arcs as they expand, contract, or disappear.

AI-generated description

This example demonstrates using a data-join with a key function to update a pie chart.

Previous: Static Data-Join

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/5682158'>Pie Chart Update, V</a>

gpl-3.0 Licensed

Similar vizzes