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

Alignment of Nodes (Parent and children vertically) #19

Open
basnetjiten opened this issue Jan 22, 2023 · 1 comment
Open

Alignment of Nodes (Parent and children vertically) #19

basnetjiten opened this issue Jan 22, 2023 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@basnetjiten
Copy link

basnetjiten commented Jan 22, 2023

Hi thanks for this awesome package. I have little concern regarding alignment of the Nodes. I am creating a family Tree, I want to align the nodes at center so that two children nodes align accordingly to top node , I tired to show them visually here.
Brackets [ ] represent the nodes, there childres nodes

IMG_20230122_114143

Please guide me through the right path, it is doable.

@basnetjiten basnetjiten changed the title Align Node Alignment of Nodes (Parent and children vertically) Jan 22, 2023
@lempiy
Copy link
Owner

lempiy commented Jan 23, 2023

Hello.
This package uses grid approach for graph representation, meaning that graph's underlying coordinate space is, basically, a 2d Matrix.
Drawing trees in manner above goes out of current grid algorithm capabilities. If you want to draw tree in symmetrical but non grid manner you may try other packages. For instance this:
https://pub.dev/packages/graphview .

I think, in future releases feature like this would be added by creating a gap in the center of even node children.

|_|_|x|_|_|
|x|x|_|x|x|

But thats is also not 100% perfect solution.

@lempiy lempiy added enhancement New feature or request question Further information is requested labels Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants