Skip to content

Instantly share code, notes, and snippets.

@hdickie
Created April 30, 2017 20:34
Show Gist options
  • Save hdickie/642e513a17fda1256e70c0b4cf686596 to your computer and use it in GitHub Desktop.
Save hdickie/642e513a17fda1256e70c0b4cf686596 to your computer and use it in GitHub Desktop.
fresh block
license: mit
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
</style>
</head>
<body>
<svg height = "500" width = "960" id = "dendrogram"> </svg>
<script>
// Feel free to change or delete any of the code you see in this editor!
var svg = d3.select("#dendrogram"),
margin = {top: 40, right: 80, bottom: 20, left: 60},
width = svg.attr("width") - margin.left - margin.right,
height = svg.attr("height") - margin.top - margin.bottom,
g = svg.append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")");
g.append("rect")
.attr("x1",100)
.attr("x2",200)
.attr("y1",100)
.attr("y2",100);
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment