How to set internal-links in gantt chart

Hi there, I’m wondering if mermaid can make gantt chart with internal-links. Is it impossible?

I know that it’s possible with graph. If you have an example gantt chart for me, I could try it and report back.

I tried this one but it doesn’t work well. Because I’m beginner, I might have some easy mistakes. I would be happy if you teach me how tow make internal-link. Thank you a lot.

	title 2021 schedule
	dateFormat YY-MM-DD 
		project 1: cl1, 21-04-01, 21-05-01
		click cl1 href  "[[internal-link]]"

Thank you for the snippet. Sorry it took so long, I had to confirm something first.

Mermaid in Obsidian supports linking to notes as described in the help docs.
We updated them today, so you didn’t overlook them in case you’re wondering.

I tried to do it as described in the help docs. It didn’t work. I can however confirm that it works with flowchart and graph.

Mermaid doesn’t support linking natively. However, Mermaid allows some things which magically allowed adding classes to the elements, which triggers our internal link resolution hook when clicked. With every Mermaid update, the devs have to look at the code again to keep supporting it.

Sadly, it doesn’t seem to work for gantt charts. I suspect that this kind of diagram doesn’t allow adding classes. (I tried to change the title of it as described in the second example in the help docs linked above, which outputs the title as is instead of having the same effect as it does for graph and flowchart).

Sorry that we can’t support linking for gantt diagrams at this moment. :confused:

1 Like

Hi! I cant understand how to insert backlinks into mermaid diagrams?
I know how to do it in Flowchart:

graph TD
a --> b
b --> c
d --> c
class b internal-link;

But how to do the same with Mermaid Gantt or Sequence diagram?
Is it possible :worried: ?


This would be great to solve! :slight_smile:

I think you can put this line at the end of your gantt:
click taskid href "obsidian://vault/YOUR_VAULT/"

You can see the full example here (ignore the script part)

1 Like

Confirming this works


section Home
Shopping: shopping, 03-06, 5h

click shopping href "obsidian://vault/brain/"

This changes the styling text from solid to outline for a quick verification before testing the click itself: