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

[Question] Selective Node Spacing Configuration in ELK Layered Layout #301

Open
sagunji opened this issue Sep 30, 2024 · 3 comments
Open
Labels

Comments

@sagunji
Copy link

sagunji commented Sep 30, 2024

I am currently working on a workflow visualization using elks and have encountered a challenge while trying to customize the spacing between specific nodes. I’m using the layered layout algorithm and would like to adjust the elk.spacing.nodeNode parameter for some nodes selectively so that sure edges between nodes have shorter lengths than others.

Here is the elklive example

Expected behavior
I would like to control the edge length or specify the distance between two nodes.

Screenshots from actual product
image

Additional context
The screenshot has a hidden node (Join as represented in the elk example. )

@soerendomroes
Copy link
Member

Hi, in your example, the vertical distance between nodes would be set by spacing.nodeNodeBetweenLayers or spacing.edgeNodeBetweenLayers, which is not available as an individual spacing option.

Here is an overview for all spacing options. However, note that the guide assumes that the layout direction is left-to-right, hence vertical and horizontal would be interchanged for your use case.

@sagunji
Copy link
Author

sagunji commented Oct 7, 2024

@soerendomroes so, we cannot control spacing between two specific node as the spacing applies to whole graph. Is that so? Is there an alternative?

@soerendomroes
Copy link
Member

@sagunji Sadly there is currently no real alternative.

The issue is tracked here. Currently, this seems to be a lot of implementation effect, since one has to make sure that all parts that work with coordinates adhere to the individual spacing.

However, the following may work for you:

Maybe you can introduce invisible parent nodes, as shown here?

Maybe you can solve the issue by post-processing?

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

No branches or pull requests

2 participants