This is a sankey diagram aligned left based on Vasco Asturiano great work.
The collapsible option was a great work made by sheilak
The gradient coloring was done based on AmeliaBR answer on StackOverflow
forked from TheBiro's block: Collapsible Sankey Diagram Aligned Left (Sample 4)
forked from AJ-Mengistu's block: Collapsible Sankey Diagram Aligned Left (Sample 4)
forked from AJ-Mengistu's block: Collapsible Sankey Diagram Aligned Left (Sample 2)
forked from AJ-Mengistu's block: Collapsible Sankey Diagram Aligned Left (Sample 4)
xxxxxxxxxx
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3 Sankey Chart for visualizing churn</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<span id="buttons">
<button type="button" id="start" onclick="window.location.reload()">Start</button>
<button type="button" id="reset" >Reset</button>
<!-- <button type="button" id="refresh" >Refresh</button> -->
</span>
<span id="canvas">
<div id="chart_15"></div>
</span>
<script type="text/javascript" src="https://d3js.org/d3.v4.min.js"></script>
<script type="text/javascript" src="d3-sankey.js"></script>
<script type="text/javascript" src="script.js"></script>
</body>
</html>
https://d3js.org/d3.v4.min.js