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.
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.
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.
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 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.
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
If I’m not mistaken, the syntax to use is: exclude-from-graph-view:: true . You should put this in the first block of the page in question. If that page already has properties in its first block, make sure to use shift+enter to create a new line without creating a new block for this property.
I tried both: property:: exclude-from-graph-view: true
and property:: exclude-from-graph-view:: true (with two ‘:’ signs before ‘true’)
But still, it doesn’t work: the graph shows that page.
Attached the screenshot…is there anything I am missing? Also, not sure whether that’s relevant but when I click away from the block (when I am not in edit mode), the second colon sign disappears - I see property: exclude-from-graph-view:: true.
We may have a misunderstanding here of what you are trying to achieve. Let me start with stating what I know about this property.
The page property exclude-from-graph-view is meant as a way to keep certain pages out of the graphical representation of your graph. This view is accessed through the menu item “Graph view” in the left-hand sidebar. To use this property, you have to place it in the first block under the page title, using the format: exclude-from-graph-view:: true. As for the second colon disappearing when you are not in edit mode; that is, indeed, the expected behaviour. To exclude pages with the “exclude-from-graph-view” property set to “true” you have to turn off the “Excluded pages” toggle switch you can find under the “Nodes” item in the top-right of this graph view. See image below.
That is all this property does. It won’t hide your page from your normal graph’s listings or views, only from the graphical view.
I hope this answers your question. If not, please let me know what exactly you are trying to achieve, so I may be better able to assist you.
Disclaimer: I am not a developer, just a fellow Logseq user trying to be helpful. My understanding of how things really work under the hood is very limited. I only know what I have experimented with myself.
When the property line is in the first bullet point on your page, it should work. It works for me. If it doesn’t work for you, there may be a bug I am not aware of. Sorry, my expertise ends here. I apologise for not being able to help you further.