This variation of a line chart demonstrates a sequence of chained transitions. Clicking on the radio buttons changes the displayed metric. First, the line transitions to the new values. Then, the axes rescale to fit the new data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.4/mapbox.js'></script> | |
<script src='http://d3js.org/d3.v2.js?2.9.3'></script> | |
<link | |
href='http://api.tiles.mapbox.com/mapbox.js/v0.6.4/mapbox.css' | |
rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } |