This example will lead you step-by-step to build an animated bar chart with dynamic data.
For each step, you should view source: each new piece of code will be annotated with a comment.
12_exit.html — Transitioning bars and removing outgoing elements
Code samples developed for the “Introduction to Data Visualization on the Web with D3.js” tutorial at VisWeek 2012 by organizers Jérôme Cukier, Jeff Heer, and Scott Murray.