Option to ignore certain nodes in the graph

The graph viewer currently shows “TODO/DOING/NEXT” nodes which unnecessarily links pages which might not be related and create clutter. Currently the graph viewer has the option to ignore only “journal” nodes, I think this can be generalised further for removing ‘TODO/DOING’ and other nodes.

Edit: We can have an additional property like include_in_graph: true or something in the UI.

do you consider this as solved?

With the current version you can filter out the “built-in pages” which no longer shows TODO and so on.

For me it’s no.
I think property like exclude_from_graph should be added for case like below.

When making pages like [[my page lists1]], [[my page lists2]] for listing many pages,
the all other pages ref the list pages, and there will be too many edges on the graph.

Like this case, someone can feel too many edges are bothering, and wants to hide some nodes on the graph.
Not only this example, there will be other cases for users who want to hide specific nodes.

So, the feature can be like 2 types.

  1. Add new page attribute for exclude_in_graph: true which is default false.
  2. On the graph view, add right-click popup on the node for hide the node

I need the same feature too.
My situation is I have some pages like [[tag structure]], [[templates]], [[content map]] which have so many tags in them. Then in the graph view, there will be so many useless edges and that bothers me a lot.
What I want is just like the feature you said, an attribute which can hide a node in graph view.

1 Like

This would be essential for tags for definitions, like simply #definition. Useful for queries, but I don’t do it because it would mess up my graph.

Either an attribute would do, but personally I think a filter in the graph would be better. It would only require one action to filter 1000 links to [[definition]], instead of writing exclude_in_graph: true 1000 times like @the-jb is suggesting.

In fact, I vote for the suggestion exclude_in_graph or sth like that. I like the idea very much and think this should be an important feature for the graph view to be more usuful.
In your case, you do not need to write it 1000 times. Writing it just once in the [[definition]] page property is sufficient.
On the other hand, if implementing the filter on the graph level, one might need to go through a long long list of pages to click the ones to be neglected.

I changed my mind, you’re right. This is the way.

It might be useful if the nodes menu of the graph has a way to show which pages have the exclude_in_graph attribute, to set this to false again, or to add new pages for which the exclude_in_graph:: true property is added. This would compliment suggestion 2 of @the-jb :

Add new page attribute for exclude_in_graph: true which is default false.

But since Logseq is still new and the devs can only focus on so many things I would say that the suggestion quoted above is definitely enough.

+1 for this suggestion. It would be very helpful for pruning the graph.

1 Like

+1 from me too. exclude_in_graph would be a life-saving attribute.
I have a ton of pages >3k which all link to the same three base-nodes, this produces a lot of noise in the graph, excluding these pages from the graph would reduce the visual noise as well as the (I presume) the time it takes to render such a huge network of nodes.

My bad.
After delving a bit deeper in the GitHub repository, I found a commit that already implemented this feature. Should’ve checked beforehand.
The page attribute is now called exclude-from-graph-view


Can confirm this is now supported by the exclude-from-graph-view page property. It is documented in https://docs.logseq.com/#/page/term%2Fproperties

1 Like