D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
pnavarrc
Full window
Github gist
Force Vertical Gravity
Force layout with vertical gravity.
<!DOCTYPE html> <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