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>
</body>
</html>
 
svg { border: 1px solid #ccc; }
 
var svg = d3.select("body").append("svg")
  .attr("width", "100")
  .attr("height", "100");
var circle = svg.append("circle")
  .attr("cx", "25")
  .attr("cy", "25")
  .attr("r", "10");
circle.on("click", function(ev) {
  d3.select(this).
    attr("fill", "orange");
});
Output

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

Dismiss x
public
Bin info
geosocopro
0viewers