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

Force-directed layout algorithm generates more cluttered and messy visualizations #216

Closed
prrao87 opened this issue Aug 21, 2024 · 2 comments

Comments

@prrao87
Copy link
Member

prrao87 commented Aug 21, 2024

Kùzu version

0.6.0

Operating System

macOS Sonoma 14.5

Browser

Google Chrome: Version 127.0.6533.120 (Official Build) (arm64)

Description

In 0.6.0, the force-directed layout seems messier than before. The edges cross over each other and the initial layout that's rendered in the graph view looks more cluttered and harder to interpret.

force-directed-new

This is even worse when we visualize larger graphs. There are a lot of criss-crossing edges.
force-directed-new-curved-edges

This wasn't happening in earlier versions. See an earlier example of a clean force-directed layout, where the edges don't appear criss-crossed on top of each other:
force-directed-old

Is this happening because we aren't running enough iterations for the force-directed algorithm to converge to a better layout?

Steps to reproduce

The graph used to reproduce can be obtained from the attachment in #215.

The following query can be run to test:

// Find all possible paths in an undirected manner between George and Edward with a maximum length of 5
MATCH (p1:Person)-[r*1..5]-(p2:Person)
WHERE p1.name = "George" AND p2.name = "Edward"
RETURN *;
@mewim
Copy link
Member

mewim commented Aug 29, 2024

@prrao87. #225 is merged. Can you confirm if the layouting is improved when you have some time?

@mewim
Copy link
Member

mewim commented Nov 12, 2024

We have switched to use force2 layout of G6 and it looks fine for most of the cases. I am closing this for now. Feel free to reopen it if there is other layouting issues.

@mewim mewim closed this as completed Nov 12, 2024
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