Force layout with vertical gravity.
xxxxxxxxxx
<html lang="en">
<head>
<script src="//d3js.org/d3.v3.min.js"></script>
</head>
<style>
svg {
overflow: visible;
border: solid 1px #666;
}
.node {
fill-opacity: 0.8;
stroke: #fff;
stroke-width: 2;
}
</style>
<body>
<svg class="gravity"></svg>
<script type="text/javascript" src="main.js"></script>
</body>
</html>
https://d3js.org/d3.v3.min.js