question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix the positions of some nodes/edges during rendering

See original GitHub issue

Is it possible to specify the position of some (but not all) nodes at fixed coordinates?

Ideally, I’m imagining this kind of input:

g = new dagreD3.Digraph()

g.addNode({label : 'node at the origin', x : 0, y : 0})
g.addNode({label : 'node at 100, 100', x : 100, y : 100})
g.addNode({label : 'put me wherever'})
g.addNode({label : 'me too'})

//add a bunch of edges
...

renderer.run(g, d3.select("#mycanvas svg g"));

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

2reactions
gitsomecommented, Jan 3, 2017

I had to make changes to dagre not dagre d3. I noticed this isn’t being maintained so I have made changes in a fork of dagre and then have a fork of dagre-d3 to pull in the forked npm dependency. https://github.com/gitsome/dagre-d3

0reactions
gitsomecommented, Dec 28, 2016

screen shot 2016-12-28 at 12 16 12 pm Okay, I got something that seems to be working. I need to get the tests running, then write some tests and then I’ll put up a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to keep node positions when changing edges
I would like to be able to uncomment the lines but have all the nodes stay in the same place as above. Just...
Read more >
Placing Graphviz nodes in fixed positions - Observable
From the Graphviz Node, Edge and Graph Attributes documentation: ... This means that you can place the nodes at fixed positions by adding...
Read more >
Rgraphviz - how to use node positions from one graph as ...
<div class="preformatted">I'm trying to plot graphs using Rgraphviz where I specify the node positions and let neato draw the edges. Accor…
Read more >
12. Styles — Cytoscape User Manual 3.9.1 documentation
One of Cytoscape's strengths in network visualization is the ability to allow users to ... Bypass displays any style bypass for a selected...
Read more >
Item Layout | Displaying the Graph | yFiles for HTML ...
The label can be placed at any position and that position can be either a fixed location anywhere in the graph or a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found