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

Is there a way to edit the position of a node in the chart? #397

Open
ducanh1296 opened this issue May 6, 2024 · 3 comments
Open

Is there a way to edit the position of a node in the chart? #397

ducanh1296 opened this issue May 6, 2024 · 3 comments

Comments

@ducanh1296
Copy link

In my case, I use expandAll(). Is there any way for me to move Node 2 to the position as shown in the image? (To the right side of Node 1)
Thank you, everyone.
Screenshot 2024-05-06 at 13 35 33

@bumbeishvili
Copy link
Owner

Hi, I don't think that there is, without modifying core code

@ducanh1296
Copy link
Author

@bumbeishvili If I have to fix the core, how should I do it? Can you suggest some ideas to help me?

@bumbeishvili
Copy link
Owner

You should try your luck somewhere along these lines

if (attrs.compact) {
this.calculateCompactFlexDimensions(attrs.root);
}
// Assigns the x and y position for the nodes
const treeData = attrs.flexTreeLayout(attrs.root);
// Reassigns the x and y position for the based on the compact layout
if (attrs.compact) {
this.calculateCompactFlexPositions(attrs.root);
}

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

No branches or pull requests

2 participants