From af802822e69ad07e2f664d16361ff89cacefcd1d Mon Sep 17 00:00:00 2001 From: lxsang Date: Thu, 18 Feb 2021 18:07:25 +0100 Subject: [PATCH] add streng force to link --- blog/assets/graph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blog/assets/graph.js b/blog/assets/graph.js index 78c86b5..b42b09d 100644 --- a/blog/assets/graph.js +++ b/blog/assets/graph.js @@ -63,7 +63,8 @@ $(document).ready(function () { .force("link", d3.forceLink(links) .id(d => d.id) - .distance(d => 2.0 / d.score) + .distance(d => 1.0 / d.score) + .strength(d => d.score) ) .force("charge", d3.forceManyBody()) .force("center", d3.forceCenter());