Skip to content

Instantly share code, notes, and snippets.

@ozluy
Created June 13, 2016 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozluy/18c26950ca37467b9f71684c012caa47 to your computer and use it in GitHub Desktop.
Save ozluy/18c26950ca37467b9f71684c012caa47 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="dikdortgen"></div>
<div id="cember"> </div>
<div id="yazi"> </div>
</body>
</html>
d3.select("#dikdortgen")
.append("svg")
.attr("width", 200)
.attr("height", 200)
.append("rect")
.attr("width", 200)
.attr("height", 200)
.style("fill", "yellow")
d3.select("#cember")
.append("svg")
.attr("width", 200)
.attr("height", 200)
.append("circle")
.attr("cx", 100)
.attr("cy", 100)
.attr("r", 100)
.style("fill", "blue")
d3.select("#yazi")
.append("svg")
.attr("width", 250)
.attr("height", 50)
.append("text")
.text("Easy Peasy")
.attr("x", 0)
.attr("y", 25)
.style("fill", "green")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment