typedb-studio icon indicating copy to clipboard operation
typedb-studio copied to clipboard

Graph layout fits to a square, making it inefficient in a rectangular view

Open mathieuisabel opened this issue 3 years ago • 2 comments

Please replace every line in curly brackets ( { like this } ) with appropriate answers, and remove this line.

Description

The graph layout is not using the available screen space.

Environment

  1. TypeDB version: 2.14.1
  2. OS of TypeDB server: Windows 11
  3. Studio version: 2.14.1
  4. OS of Studio: Windows 11
  5. Other environment details:

Reproducible Steps

Run a query with a good amount of data.

Expected Output

Graph is layout is optimized as per the viewable area.

Actual Output

image

Additional information

{ Any additional information, including logs or screenshots if you have any. }

mathieuisabel avatar Nov 29 '22 14:11 mathieuisabel

Related:

  • https://github.com/vaticle/typedb-studio/issues/465

To be honest though, I'm not sure there exists an ideal solution here. The Fruchterman-Reingold algorithm always lays vertices out in an approximately circular shape, and while we can stretch edges to occupy more space, that only "occupies more space" as opposed to "showing more content".

However, if we implement https://github.com/vaticle/typedb-studio/issues/465, then the natural aspect ratio will be something like 3:2 as opposed to the current 2:1, which will certainly look better on a rectangular canvas.

alexjpwalker avatar Dec 01 '22 11:12 alexjpwalker

Also maybe another consideration, if we can do #676 that might help with this situation as splitting the screen vertically would make it a bit more square on 16:9/16:10. On 21:9 that might still be a problem though.

mathieuisabel avatar Dec 01 '22 15:12 mathieuisabel