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

Review the "Manhattan" layout algorithm #58

Open
tbouffard opened this issue Sep 7, 2020 · 1 comment
Open

Review the "Manhattan" layout algorithm #58

tbouffard opened this issue Sep 7, 2020 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@tbouffard
Copy link
Member

tbouffard commented Sep 7, 2020

This is the way we are building the graph under the hood: The Manhattan distance function computes the distance that would be traveled to get from one data point to the other if a grid-like path is followed.

resources

mxgraph java implementation

used by bpmn.io for autolayout (there are refs to this algorithm described in diagram-js)

@tbouffard tbouffard added the documentation Improvements or additions to documentation label Sep 7, 2020
@tbouffard
Copy link
Member Author

tbouffard commented Sep 14, 2022

I found this JS lib that manages the Manhattan layout greatly!

Manhattan layout

demo: https://x6.antv.vision/zh/docs/api/registry/router#manhattan

x6_layout_manhattan

Metro layout

demo: https://x6.antv.vision/zh/docs/api/registry/router#metro

x6_layout_metro

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

No branches or pull requests

1 participant