Improve Graph View: Relationship Types, Link Styling and Graph Parameters like in Cosma

The usability of logseq’s graph view could be vastly improved by taking acue from open source knowledge graphing tool cosma. Specifically, it has

Link styling and relationship types

Styling links in the graph view - from Cosma dos:

Within a record, you link to another record by writing its identifier between double brackets.

Example:

A link to [[20201209111625]] record B.

Cosma allows you to define link types. Each link type is defined by a name, a colour and a stroke pattern. To apply a type to a link, add the name of the type followed by a colon before the identifier.

Example:

Concept B is derived from [[generic:20201209111625]] concept A.

Person D wrote against [[opponent:20201209111625]] person C.

To improve the readability of records in the cosmoscope, Cosma includes an option to customise the text of the links. Under Preferences › Link symbol, enter one or more Unicode characters (letters, numbers, symbols…). Example: ☞. This string replaces the identifier and square brackets in the HTML rendering of the records.

This also comes with link stylings that would greatly increase the readbility and actual relational information visualised b the Logseq graph:

Link types

This section allows you to define different types of links. For each type, enter a name, a colour and a stroke type. The available stroke types are:

single
double
dash
dotted

To apply a type to a link, add the name of the type followed by a colon before the identifier.

The colour and stroke type of the undefined type can be changed, but the type cannot be removed.

The graphic settings of the links affect their readability in the graph. For example, if you set undefined links to grey dotted lines and a special link type to black solid lines, the special links will be more visible in the graph.

Graph Parameters

Cosma also has great graph parameter controls that aid graph “explorability”:

I am aware of juggl but find Cosma’s approach to be both tidier and more structured towards adding meaningful metatdata that aid in structuring relationships between blocks/pages/units of information.

@Nuvic posted about some of these in february: How the graph view could improve creativity but I thought its best to create a new request with a more specific title and citations and screenshots from the English laguage section of the Cosma docs…

I’d definitely like to something like this in a new version of Logseq but for those like me that want better graph visualisation now, I would suggest the pluggin Logseq Graph Analysis.

The plugin doesn’t let you control the graph forces but it does provide saner defaults, that allow for better graph visualisation. The plugin also provides some useful graph algorithms to help assist finding creative connections between notes, as well as finding routes through the graph to construct linear lines of thought. It also seems snappy (computationally efficient), which is a nice bonus.

While not directly linked to your feature request you have raised, it would also be nice to implement some of these graph algorithms in base Logseq.

2 Likes

I came across this thread, while looking for similar thread, or people sharing similar wish, which is to have syntax to annotate what is relationship type between entities, so it’s a tripe “subject predicate object” : Relationship types (predicates) - Colored graph

Another related discussion: A meta-graph as a set of linked graphs - #14 by gax

2 Likes

Is someone working on a plug-in or feature for this? I would really like to add Neo4j’s Cypher to the mix since I want related pages/blocks to have a relationship

Hi. feat: add ability to change graph forces via UI by mp-v2 · Pull Request #10755 · logseq/logseq · GitHub shipped with the 0.10.6 release. Maybe it resolves your request

2 Likes

https://www.youtube.com/watch?v=MH_gwM60xgE&t=3s it is open full scale personal knowledge graphs idea . i some how manage to make setup with obsidian and excalibrain but will happy to have it in logseq