kuzudb / explorer

Browser-based user interface for Kùzu graph database
https://hub.docker.com/r/kuzudb/explorer
MIT License
29 stars 5 forks source link

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

Open prrao87 opened 3 weeks ago

prrao87 commented 3 weeks ago

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 commented 2 weeks ago

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