1
0
mirror of https://github.com/d3/d3.git synced 2026-01-25 15:24:06 +00:00
d3/examples/transform/null.html
Mike Bostock d3f855ae01 Rename d3.v3.js to d3.js.
We'll still use the major-versioned name file for d3js.org, but this is simpler.
2012-10-05 18:46:05 -07:00

26 lines
556 B
HTML

<!DOCTYPE html>
<body>
<script src="../../d3.js"></script>
<script>
var svg = d3.select("body").append("svg")
.attr("width", 960)
.attr("height", 500);
var g = svg.append("g")
.attr("transform", "translate(100,100)")
.append("g")
.attr("transform", "translate(0,0)rotate(0)");
var rect = g.append("rect")
.attr("x", -25)
.attr("y", -50)
.attr("width", 50)
.attr("height", 100);
g.transition()
.duration(3000)
.attrTween("transform", d3.tween("translate(100,100)rotate(360)", d3.interpolateString));
</script>