ericdrowell/ElGrapho

Ability to tweak line width independently of nodeSize

Closed this issue · 3 comments

With graphs with a lot of nodes, it would be useful to have reasonable size hover targets for the nodes, while making the edges thin enough to over-paint better and reveal more structure.

Can you share an example or screenshot? have you tried setting nodeSize? Check out the docs, the default is 1, but you can lower it to something like 0.1 if there's a high density of nodes.

The following codepen uses a node size of 0.5:

https://codepen.io/ericdrowell/pen/bJwgRG?editors=0010

Yes, what I'm saying is that it'd be useful to be able to tweak the edge width independently of the node size. They're currently intrinsically linked.

On a graph with a lot of edges (sort of the point of this lib!), if you set nodeSize to say 0.05 the edges become nice and thin, which means they overpaint each other less => better to see what's going on. But then the nodes become impossible to really see/hover over, because they're too small.

(Can't gist you an example this weekend, sorry, but hopefully you get what I'm talking about.)

I see. I will add a configuration that let's you control edgeSize as well this weekend. Thank you!