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

Graph visualisation #651

Merged
merged 36 commits into from
Jan 20, 2025
Merged

Graph visualisation #651

merged 36 commits into from
Jan 20, 2025

Conversation

macjuul
Copy link
Contributor

@macjuul macjuul commented Jan 20, 2025

This PR implements graph visualisation of records as a new display mode for Query View responses.

Features

  • Visualise any supported query response as a graph
  • Automatic force based physics layout
  • Control appearance by hiding tables, edges, and individual nodes
  • Right-click nodes for actions such as opening the inspector, hiding visibility, and expanding relationships
  • Expand node relationships to append all neighbouring nodes to the graph

Response visualisation

In order for Surrealist to build a graph, it will recursively analyse the query response to collect a list of all referenced record IDs. These are sent back to the database to discover all relationships between this subset of records.

Table & edge filtering

The integrated sidebar allows you to toggle the visibility of tables and edges. Doing so will immediately update the graph, causing nodes to slowly re-arrange themselves where necessary.

Record expansion

When a record context menu is opened, Surrealist will query all direct record relations which are not yet represented in the graph.

Appearance options

There are two additional settings provided to fine-tune the graph for visual clarity, which is the ability to show stray records (records with zero relations), and the ability to collapse edges into straight lines.

Preview

image

Closes #427

@macjuul macjuul merged commit a8eac6f into main Jan 20, 2025
4 checks passed
@macjuul macjuul deleted the feat/graph-visualization branch January 20, 2025 14:36
@macjuul macjuul mentioned this pull request Jan 20, 2025
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

Successfully merging this pull request may close these issues.

Feature: visualization & Analysis Graph models
1 participant