Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <svg></svg>
</body>
</html>
 
// adding the line 
var svg = d3.select('svg');
var lines = svg.selectAll("line")
.data(['a','b','c'])
    .enter()
    .append("svg:line");
// line attributes
lines
.attr("x1", 0)
           .attr("y1", 0)
           .attr("x2", 0)
           .attr("y2", 0)
           .transition()
           .duration(600) 
         .attr("x2", 100)
           .attr("y2", 0)
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers