Better tag visualization in graph view: show links between tags, resize tags based on mention

Yeah I was thinking of it as a separate view from the current graph view. Though it will be comparatively basic to the current graph view and local view. Kind of like the graph view in Walling. It will be interesting to explore the relationships as a result.

4 Likes

+1 for this request!

1 Like

That would be really great. Especially when using multiple tags on a note

3 Likes

Great idea!

My thought was that the graph could support both pages and tags. The user can this filter which is seen.
With just page user sees current graph.
With page and tags, user sees page-page arcs and tag-page arcs.
With just tags, pages are hidden so tag-{pages}-tag becomes just tag-tag.

This allows the user to navigate between pages based on direct links and shared tags.

6 Likes

A great feature should be.
Meanwhile I just use links instead of tags (with a hash sign).

The latest insider builds (0.9.x) support displaying tags in the graph view.
However, it currently looks like this from what I see:

  • it shows relations from a note to all the tags it contains
  • it shows relations from a single tag to all the notes it is contained in
  • it doesn’t show a relation from one tag to another if they are contained in the same note

Hi…
I can see a relation of tags by filtering tags (this feature is awesome!), for example :

But the graph view can’t show the tags node if I search “tag:#Problem tag:#PracticalKnowledge” (removing ‘OR’)

I don’t know whether this is a bug or not. At least, it works as I expected. Thanks a lot to devs!

4 Likes

It would definitely be interesting and useful to see a graph view based on a tag connection (temporarily hiding backlink connections), either in the main graph or way to get a local graph for tags.

Filtering the global graph view to a tag still shows the backlink relations so doesn’t quite solve this unless backlink links can be toggled off.

1 Like

Hello,

Thanks alot for the changes the developers made into the graph view; it makes much more sense now. So, I’ve been trying to tweak my notes in a way to diverge normal zettel/evergreen/atom-notes; from higher-level concepts/categories; I did that by making the larger concepts like “Habit” tags (i.e. #habits) - before they were normal entries with links.

The problem is that the #tag - as we all know - is a terrible way to note-take; and it’s because it can’t be linked to other tags/notes. But, I think it is easy to feature that in Obsidian after the last updates.

Now, if I want to see a graph view of a tag; I must go to the global graph view; and search it (i.e. enter #habits); but this will not show deeper connections of notes using the tag (that would show normally in local graph view) (i.e. if there’s a note linking evolution theory to habit-normalization; I won’t be able to see the linkage between #habits & #evolution_theory).

So; long story short; It would be enormously helpful if you add depth that shows other tags to global graph view Search Mode!

Thank you :slight_smile:

4 Likes

While adding tags to the graph is definitely useful for viewing relationships, I find myself still wanting to quickly view and navigate my tags in a structured way. I think tag folders would be more practically useful for that (Tag folders (in tag pane)).

4 Likes

I just had the idea to colour links according to them being bidirectional or just linking in one direction

+1 great idea

1 Like

同意,我也有类似的想法。

1 Like

+1 this would be so useful

1 Like

+1 is the masthave function. Having familiarized myself with obsidian, I thought that it already worked by tags…

Links between files are inconvenient. What if I need to link 4 files together?) Do I need to register a new one in all 3 previous ones?)) What will be with n files?)

And so I added a tag and that’s it, then only change the cuts

+1 Any update on this fantastic feature?

+1! This feature is super necessary, and would increase the possibilities of working with tags!

1 Like

+1 This feature would be extremely useful for doing research on different perspectives for a given concepts.

I tried to use ChatGPT based on the requests in this forum to code the plugin we are looking for. ChatGPT didn’t give a complete solution, but maybe its answer can be used as a starting point for folks who have the necessary experience to implement the steps toward such a plugin. Can someone evaluate if this result is helpful and whether the direction ChatGPT is pointing towards looks promising?

Prompt number 1 was:

can you code an obsidian plug-in?


// main.js
module.exports = {
    onload() {
        console.log('Hello from your Obsidian plugin!');
    }
};


Here are the steps to create an Obsidian plugin:

Create a new folder in your Obsidian plugins directory. This directory is typically located at <vault>/plugins/. Name your folder appropriately, for example, my-plugin.
Inside the plugin folder, create a main.js file with the code provided above.
Open Obsidian and go to the Settings > Options > Community plugins.
Enable "Safe mode" to allow the loading of local plugins.
Reload Obsidian.
Your plugin should now be loaded, and you should see the console log message in the developer tools (you can open the developer tools by pressing Ctrl+Shift+I or Cmd+Opt+I).
This is a basic example, and you can expand on it by exploring the Obsidian API and adding more functionality based on your requirements. The Obsidian API documentation is available at https://github.com/obsidianmd/obsidian-api.

Remember to refer to the Obsidian API documentation for detailed information on available methods and events to interact with the Obsidian app.

Prompt Number 2 was:

create a plugin that makes it possible to have a graph view for tags also. I mean like to check how the tags are interlinked to each other. And the more number of times a tag is mentioned the bigger the circle is in the graph view. I was thinking of it as a separate view from the current graph view. Though it will be comparatively basic to the current graph view and local view. Kind of like the graph view in Walling. It will be interesting to explore the relationships as a result. My thought was that the graph could support both pages and tags. The user can this filter which is seen.
With just page user sees current graph. With page and tags, user sees page-page arcs and tag-page arcs. With just tags, pages are hidden so tag-{pages}-tag becomes just tag-tag. This allows the user to navigate between pages based on direct links and shared tags.

Creating a plugin like the one you've described involves more advanced development and interaction with the Obsidian API. Below is a simplified example to get you started. This example uses the onload event to create a new button in the toolbar, and when clicked, it opens a new modal with a graph view of tags.

// main.js
module.exports = {
    onload() {
        this.addRibbonButton();
    },

    addRibbonButton() {
        // Add a button to the toolbar
        this.ribbonIcon = this.addIcon("graph", "Graph Tags", async () => {
            // When the button is clicked, show the modal
            this.showTagGraphModal();
        });
    },

    showTagGraphModal() {
        // Create a new modal
        const modal = this.app.workspace.addModal(new TagGraphModal());
        modal.open();
    }
};

class TagGraphModal extends import("obsidian").Modal {
    constructor() {
        super();
    }

    onOpen() {
        // Perform actions when the modal is opened
        const contentEl = this.contentEl;

        // Add your graph rendering logic here
        contentEl.innerHTML = "<h2>Tag Graph View</h2><p>Your graph rendering logic goes here.</p>";
    }

    onClose() {
        // Perform actions when the modal is closed
    }
}


This is a starting point, and you'll need to build the logic for rendering the tag graph based on your requirements. You would likely need to use D3.js or a similar library to handle the graph visualization.

For a complete plugin, you need to consider:

Accessing Tag Information: You can use the Obsidian API to get information about tags and their occurrences.
Graph Rendering: Use a JavaScript graph library like D3.js or another suitable library for rendering the graph. Define the nodes and edges based on the tags and their relationships.
Modal UI: Create a modal that displays the graph. Handle user interactions and filter the graph based on the selected options.
Integration with Obsidian: Ensure that your plugin integrates seamlessly with Obsidian and follows Obsidian's plugin development guidelines.
For a more complete and functional plugin, consider diving into the Obsidian API documentation and exploring relevant JavaScript libraries for graph visualization. You might also find inspiration from existing Obsidian plugins.