How to insert a node at specific position in dagred3

426 views Asked by At

I am trying to create a simple graph and i wanted to add nodes at specific position.

const graph = new dagreD3.graphlib.Graph().setGraph({})
    .setDefaultEdgeLabel(function () {
      return {}
    })
graph.setNode('a', {label: 'a', height: 20, width: 40})

The setNode is creating a node, is there anyway that i can specify the position?

0

There are 0 answers