Option to set node size proportional to file size/block size/computed value

Currently it looks like graph nodes are sized according to the number of links (this feature request is complete? Resize local graph nodes based on their links count - #2 by naught101)

It would be really nice if there was the option to make node size represent other things, in particular file size. This would allow you to see e.g. very highly linked nodes that don’t have much content (small dot) - this might be useful for e.g. deciding to write more on that topic, or perhaps split up that topic.

Number of links is already represented on the graph anyway, so this is currently duplicate information.

Welcome to the community @naught101!

The size of nodes in the graph view is indeed based on the amount of incoming links. But as Logseq DB (in pre-alpha, see announcement) will drop the use of plain text files for storage, file size is probably not a good indicator. So, maybe number of blocks on a page could be better indicator.

What are other dimensions you’d like to filter/change the view of the graph view?

Number of blocks would be good enough for my purposes too.

I don’t really know what else there might be, but I guess you could add things like:

  • number of incoming links
  • number of outgoing links
  • manual size parameter set in the page header block (what ever this is called, where aliases go)
1 Like

I hope there will be a user-configurable “node appearance function” that computes the size and color of each and every node, without having to use a specific page property.

An example in pseudo-code:

function determineAppearance (node) {
    let hide = false;
    if (node.hasTag("#TEST")) hide = true;

    let factor = 1;
    if (node.hasTag("#important")) factor = 10;
    const size = factor * node.countChildren();

    let color = default;
    if (node.hasTag("#chemistry")) color = yellow;
    if (node.creationDate === today) color = blue;

    return {HideFromGraph: hide, nodeSize: size, nodeColor: color};
}

What’s important is that this function can be customized by the user. A plugin might be able to accomplish this, although I think it deserves to be part of the core functionality of Logseq.

2 Likes