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. 