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.

Dynamic generating node and automatic positioning

See original GitHub issue

hi , first thanks for your awsome library, i create nodes and links with for loop , now my question is , is this library has any automatic arrangement for positioning nodes on the page ? if not what do i can for positioning nodes correctly and nicely on page

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
slvnperroncommented, Nov 14, 2017

Awesome Alex, can’t wait for the PR!

On Nov 14, 2017 4:14 PM, “Alex K” notifications@github.com wrote:

Small update. I’ve created a small example of how to use dagre rdi-94-dagre-example branch https://github.com/alex-enchi/react-diagrams/tree/rdi-94-dagre-example I’ll clean it up this week and make a pull request Some important notes:

Because i don’t know yet how to update node position properly (see #107 https://github.com/projectstorm/react-diagrams/issues/107) it’ll work only before first render.

Default for dagre layout direction is top to bottom, it is possible to change it dagre wiki https://github.com/cpettitt/dagre/wiki#configuring-the-layout. But there are difficulties if node has ports on all sides of the node. I.e. if distribution is top -> bottom and 2 nodes are connected via ports on the sides there is no way to tell ranking function to keep this 2 nodes on the same level

Example: Instead of this [image: example-not-gona-happen] https://user-images.githubusercontent.com/24417201/32805133-3b716de2-c991-11e7-8ab3-4989e47cf4c4.png

Dagre will generate that layout [image: example-actual-result] https://user-images.githubusercontent.com/24417201/32805134-3b9400b4-c991-11e7-9379-b589879ebdff.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/projectstorm/react-diagrams/issues/94#issuecomment-344400770, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQStJwRemynZzXgZNX9OodC_SxhHQ7mks5s2gLRgaJpZM4Pnw7W .

3reactions
alex-enchicommented, Nov 14, 2017

Small update. I’ve created a small example of how to use dagre rdi-94-dagre-example branch I’ll clean it up this week and make a pull request

Some important notes:

Because i don’t know yet how to update node position properly (see #107) it’ll work only before first render.

Default for dagre layout direction is top to bottom, it is possible to change it dagre wiki. But there are difficulties if node has ports on all sides of the node. I.e. if distribution is top -> bottom and 2 nodes are connected via ports on the sides there is no way to tell ranking function to keep this 2 nodes on the same level

Example: Instead of this example-not-gona-happen

Dagre will generate that layout example-actual-result

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add nodes at dynamic positions in Cytoscape.js?
I am using Cytoscape to draw a group based diagram, I have choose 'preset' layout for this but I came to know that...
Read more >
Dynamic graph exploration by interactively linked node-link ...
The proposed novel linked visualization strategy provides ways to adapt a view based on insight from other views; for example, clusters found in ......
Read more >
Creating dynamic clusters - IBM
You can create a dynamic cluster of on demand routers (ODRs), which means that the application placement controller selects the best node on ......
Read more >
Automatic Segmentation of Dynamic Network Sequences with ...
We propose SNAPNETS, to automatically find segmentations of such graph sequences, ... dynamic graphs with varying nodes and edges then leverage it to....
Read more >
Use node auto-provisioning | Google Kubernetes Engine (GKE)
Configure node pool autoscaling with node auto-provisioning in Standard GKE ... With compact placement policy, you can instruct GKE to create node pools...
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