feat: better graph scaling (closes #170)

This commit is contained in:
Jacky Zhao 2022-08-05 11:04:01 -07:00
parent ff4872e8a3
commit d315e75b91

View File

@ -155,7 +155,7 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig) {
const nodeRadius = (d) => {
const numOut = index.links[d.id]?.length || 0
const numIn = index.backlinks[d.id]?.length || 0
return 3 + (numOut + numIn) / 4
return 2 + Math.sqrt(numOut + numIn)
}
// draw individual nodes