dagre-d3
dagre-d3 copied to clipboard
Set individual nodesep
Hi, I would like to change the nodeseparation per node and not globally like this:
var g = new dagreD3.graphlib.Graph()
.setGraph({ rankdir: 'LR', edgesep: 10, ranksep: 60, nodesep: 10 })
I'm looking for something like this:
var g = new dagreD3.graphlib.Graph().setGraph({ )
g.nodes().forEach(label => {
if (label == 'the answer') {
let node = g.node(label)
node.nodesep = 42
}
})
How can I do that? :)