Skip to content

Instantly share code, notes, and snippets.

@igoryen
Created January 26, 2021 19:03
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 igoryen/c7722b5a5914ab391c049cf76eb5b78b to your computer and use it in GitHub Desktop.
Save igoryen/c7722b5a5914ab391c049cf76eb5b78b to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/purehok
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.2.3/d3.min.js"></script>
</head>
<body>
<h3>SVG bar</h3>
<svg>
<rect width="50" height="200" style="fill:blue"
</svg>
<h3>D3 bar</h3>
<script>
d3.select("body")
.append("svg")
.append("rect")
.attr("width", 50)
.attr("height", 200)
.style("fill", "blue");
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment