Skip to content

Commit

Permalink
#1 d3 forces
Browse files Browse the repository at this point in the history
  • Loading branch information
ussiemer committed Apr 17, 2024
1 parent 8c761e8 commit f3a20f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions templates/graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
.nodeLabel(node => node.username)
.onNodeClick(node => console.log(node));

// Configuration for forces if supported by the library
// Configuration for forces
Graph.d3Force('charge', d3.forceManyBody().strength(-120));
Graph.d3Force('link', d3.forceLink().distance(50));

Graph.onEngineStop(() => Graph.zoomToFit(400));
</script>
1 change: 0 additions & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<script src="//unpkg.com/force-graph"></script>
<script src="//unpkg.com/d3-quadtree"></script>
<script src="//unpkg.com/d3-force"></script>
<link rel="stylesheet" href="static/style.css">
</head>
Expand Down

0 comments on commit f3a20f7

Please sign in to comment.