chore(graph): increase linkDistance

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-16 17:18:56 -04:00
parent 84f7d31672
commit 847354cf18
No known key found for this signature in database
GPG Key ID: 18974753009D2BFA
2 changed files with 4 additions and 7 deletions

View File

@ -45,9 +45,9 @@ const defaultOptions: GraphOptions = {
zoom: true,
depth: -1,
scale: 1,
repelForce: 0.5,
centerForce: 0.1,
linkDistance: 30,
repelForce: 1.5,
centerForce: 0.3,
linkDistance: 90,
fontSize: 12,
opacityScale: 1,
showTags: true,

View File

@ -158,10 +158,7 @@ async function renderGraph(container: string, fullSlug: FullSlug) {
.id((d: any) => d.id)
.distance(linkDistance),
)
.force(
"collide",
d3.forceCollide((n) => nodeRadius(n)),
)
.force("collide", d3.forceCollide<NodeData>((n) => nodeRadius(n)).iterations(3))
const width = graph.offsetWidth
const height = Math.max(graph.offsetHeight, 250)