From 3b21b49a0d0c316907f30a185aad12f6eec1593f Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Wed, 1 Apr 2015 01:07:40 +0200 Subject: [PATCH] forcegraph: linkStrength = 1 / tq --- lib/forcegraph.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/forcegraph.js b/lib/forcegraph.js index 074229b..063569f 100644 --- a/lib/forcegraph.js +++ b/lib/forcegraph.js @@ -129,6 +129,9 @@ define(["d3"], function (d3) { .charge(-70) .gravity(0.05) .linkDistance(LINK_DISTANCE) + .linkStrength(function (d) { + return 1 / d.tq + }) .on("tick", tickEvent) .on("end", savePositions)