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.

Draw edge to nested node from other hierarchy level

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[] Other... Please describe:

Is there a way to draw edges to nested nodes as in the elk docs?

Current behavior

Providing the nested node as edge target does not work - the edge will not show.

Expected behavior

Would be best to just provide the id of the node and edges are automatically also drawn towards nested elements.

Example

nodes={[
  {
    id: '1',
    text: '1'
  },
  {
    id: '2',
    text: '2'
  },
  {
    id: '2.1',
    text: '2.1',
    parent: '2'
  },
  {
    id: '3',
    text: '3'
  }
]}
edges={[
  {
    id: '1-2',
    from: '1',
    to: '2.1'
  },
  {
    id: '2-3',
    from: '2',
    to: '3'
  }
]}

image

What is the motivation / use case for changing the behavior?

I would like to display nested nodes within one node and nodes from the “outside” should directly impact these nested nodes. Therefore, I need to display a direct edge towards the nested nodes.

Since we provide a parents (and no children) property, maybe we should resolve this by using the id of the nested node directly. ELKs approach is to traverse by the parents until the child is reached like edge source -> outside.inside.n1, but i think their approach is not feasible for us, no?

@amcdnl could you share some thoughts on this? If you think this is a good “first ticket”, i will try to implement it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
ASchwadcommented, Dec 13, 2020

Created these issues: #31 #32

1reaction
ASchwadcommented, Dec 10, 2020

@amcdnl thank you so much! 🎉 I did not notice so far, that edges have a parent property as well.

So I will extract the other two problems into separate issues and create a storybook story for my example from above - then we can close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hierarchical Drawing Algorithms
As usual, nodes represent entities and edges represent relationships between the entities. Closely related to hierarchically layered drawings and discussed ...
Read more >
Hierarchical Layout | yFiles for HTML Documentation
HierarchicLayout allows to control general drawing options like, e.g., edge routing styles or minimum distances between graph elements. Options which affect ...
Read more >
Nodes and Edges - PGF/TikZ Manual
For this, TikZ collects all nodes defined on the current path with this option set and then inserts all of them, in the...
Read more >
A Tree Drawing Approach for Hierarchical Edge Bundling
ABSTRACT. This paper introduces CactusTree, a novel visualization technique for representing hierarchical datasets. We introduce details about.
Read more >
Basic questions about nested blockmodel in graph-tool
That network is undirected. If if were directed, you would see an arrow. You see an arrow in the hierarchy edges just as...
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