Graph view node colours/icons based on front-matter

Assuming the API supports it, the ability to customise the graph nodes’ colours and text would make it easier to separate what cards (markdown files) are used for what. For example, we may have front-matter indicating that the card relates to a person, and another to a concept/definition, another to Map of Concepts (MOC) etc. We could prefix each category by an icon, and change the node colour. Like the example below:

customise-obsidian-graph-view

This could be realised by mapping a front-matter parameter (category) to a set of colours and optionally icons, or alternatively mapping to tags.

21 Likes

I love this idea! It would make the graph view so much more useful for browsing.

6 Likes

Is this been solved? Very useful for me to set the icon of the node in the graph

3 Likes

I’d really like to be able to set the icon used for each node in the graph view. Is there any way to do that?

My #1 use case for this is to color code based on a ‘state’ or ‘status’ attribute in the front matter. For example, I draft blog posts in Obsidian and I have a work flow that includes states such as idea, outline, draft, published. It would be nice to see the published ones displayed in a darker shade of color than those in the other states (or even different shades for each state).

Wouldn’t you simply do this with a tag, and use the already-existing tag/colour/group functionality?

AlanG, I couldn’t tell if you were relying to me or to the original post, but in my case, I want to use the Dataview and Projects plugins and they use metadata.

@BrandonBrinkley yes, exactly. So using the groups functionality of the Graph View, you could filter for all projects with metadata status of “published” with a selector like this:

/^status: published$/

image

(Assuming your metadata field is status)

+1 the feature of different colors, icons and in the knowledge graph according to metadata
I can actually use tags but metadata can be more versatile

1 Like