D3 Show Reel3
This example demonstrates D3’s ability to animate seamless transitions between ten chart types—lines, horizons, areas, stacked areas, streamgraph, overlapping areas, grouped and stacked bars, bars, and donut—using ten years of monthly closing stock prices for MSFT, AMZN, IBM, and AAPL. It renders as an SVG with timed transitions, leveraging `d3.svg.line`, `d3.svg.area`, `d3.scale.linear`, `d3.time.scale`, and `d3.nest` to reorganize and redraw the data. The code uses `setTimeout` to sequence each visualization, with axes omitted for clarity and the focus on morphing geometries rather than informing precise values.
AI-generated descriptionThe first 15 seconds of the D3 show reel. See full video at http://vimeo.com/29862153. Includes seamless transitions between the following visualization types:
- lines
- horizons
- areas
- stacked areas
- streamgraph
- overlapping areas
- grouped bars
- stacked bars
- bars
- donut
Admittedly, these aren’t the most useful visualizations; their purpose is not to inform but to demonstrate D3’s capability for producing dynamic visualizations with custom transitions. They do show real data (the monthly closing price for ten years’ worth of stock data), but I didn’t include axes for date or price. See the axis component for a better example. Also, the stacked visualizations aren’t especially meaningful, unless you imagine owning a portfolio with equal parts AAPL, AMZN, IBM and MSFT. Similarly, the bars and donuts represent the average price (or sum) during this time period.
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/1256572'>D3 Show Reel2</a>