Skip to content

Instantly share code, notes, and snippets.

@aleung
Last active October 13, 2017 07:17
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 aleung/d4eda9e17f801b14b94f23862f0cf4fb to your computer and use it in GitHub Desktop.
Save aleung/d4eda9e17f801b14b94f23862f0cf4fb to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<meta charset="utf-8">
<title>SANKEY Demo</title>
<style>
.node rect {
cursor: move;
fill-opacity: .9;
shape-rendering: crispEdges;
}
.node text {
pointer-events: none;
text-shadow: 0 1px 0 #fff;
}
.link {
fill: none;
stroke: #000;
stroke-opacity: .2;
}
.link:hover {
stroke-opacity: .5;
}
</style>
<body>
<div id="chart"></div>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="sankey.js"></script>
</body>
</html>
const svg = d3.select("#chart").append("svg")
.attr("width", 1000)
.attr("height", 800)
.append("g")
.attr("transform",
"translate(10, 10)");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment