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.