Updated version of d3-sankey-path library, with standalone library to append arrows.
This also includes an experiment with allowing circular links from end nodes to go either top or bottom, and always follow the same direction as the other links connected to those nodes.
Built with blockbuilder.org
forked from tomshanley's block: Sankey with circular links
xxxxxxxxxx
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Roboto:100i" rel="stylesheet">
<script src="https://d3js.org/d3.v4.min.js"></script>
<title>Sankey with circular links</title>
<style>
body {
font-family: 'Roboto', sans-serif;
}
rect {
shape-rendering: crispEdges;
}
text {
font-size: 12px;
font-family: monospace;
}
.link {
fill: none;
}
</style>
</head>
<body>
<h1>Sankey with circular links</h1>
<div id="chart"></div>
<script src="d3-sankey-circular.js"></script>
<script src="d3-path-arrows.js"></script>
<script src="index.js"></script>
</body>
</html>
https://d3js.org/d3.v4.min.js