Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree layout: Support transparent intermediary nodes to keep the tree tidy #174

Open
arcanis opened this issue Oct 16, 2020 · 3 comments
Open

Comments

@arcanis
Copy link

arcanis commented Oct 16, 2020

(I opened a question here, but I don't think it's possible under the current core so I don't expect many answers)

The current tree implementation seems to always put children at exactly one depth increment relative to their parent. The problem is that in some pathological cases where one child is much larger than the others, it leads to very wide nodes:

image

Ideally, I would have liked a way in D3 to say that if this situation happens, the heaviest branch are allowed to be shifted at a deeper depth to free the space necessary for the tree width to be shrinked. Basically, I'd like this:

image

Instead of this:

image

@curran
Copy link

curran commented Oct 16, 2020

Very interesting idea! Have you built a prototype of this yet?

@arcanis
Copy link
Author

arcanis commented Oct 16, 2020

Unfortunately no, I wouldn't know where to start in to understand the layout algorithm as it's currently implemented 😅

@curran
Copy link

curran commented Oct 16, 2020

Looks like something like this is discussed in Tree Drawing Algorithms by Adrian Rusu.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants