Created
February 17, 2012 05:01
-
-
Save ashleybot/1850822 to your computer and use it in GitHub Desktop.
D3.js Simple Transistions
This file contains 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
function redraw() { | |
chart.selectAll("rect") | |
.data(data) | |
.transition() | |
.duration(1000) | |
.attr("y", function(d) { return h - y(d) - .5; }) | |
.attr("height", function(d) { return y(d); } ); | |
} |
This file contains 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
// replace an element in the data array with a new value | |
data[2] = 49; | |
redraw(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment