-
-
Save mbostock/b4e46124258d1b75accb to your computer and use it in GitHub Desktop.
Transition Test
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="//d3js.org/d3.v3.min.js"></script> | |
<script> | |
var width = 960, | |
height = 500; | |
var svg = d3.select("body").append("svg") | |
.attr("width", width) | |
.attr("height", height); | |
var slider = svg.append("g") | |
.attr("class", "slider"); | |
slider.append("rect") | |
.attr("width", 100) | |
.attr("height", 100); | |
slider.transition() | |
.duration(1000) | |
.attr("transform", "translate(100,0)"); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment