# How to set internal-links in gantt chart

**URL:** <https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903>\
**Category:** Help\
**Tags:** mermaid, internal-links\
**Created:** [March 2, 2021, 12:01pm UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903 "2021-03-02T12:01:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuma](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/y/b782af/32.png) [@Yuma](https://forum.obsidian.md/u/Yuma)\
**Post date:** [March 2, 2021, 12:01pm UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/1 "2021-03-02T12:01:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![koala](https://forum.obsidian.md/user_avatar/forum.obsidian.md/koala/32/10807_2.png) [@koala](https://forum.obsidian.md/u/koala)\
**Post date:** [March 2, 2021, 1:06pm UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/2 "2021-03-02T13:06:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yuma](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/y/b782af/32.png) [@Yuma](https://forum.obsidian.md/u/Yuma)\
**Post date:** [March 3, 2021, 2:14am UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/3 "2021-03-03T02:14:57Z")

</div>

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.

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

```

---

<div class="post-metadata">

**Author:** ![koala](https://forum.obsidian.md/user_avatar/forum.obsidian.md/koala/32/10807_2.png) [@koala](https://forum.obsidian.md/u/koala)\
**Post date:** [March 5, 2021, 12:25pm UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/4 "2021-03-05T12:25:07Z")

</div>

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](https://help.obsidian.md/How+to/Format+your+notes#Diagram).  
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. 😕

---

<div class="post-metadata">

**Author:** ![andypassion](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@andypassion](https://forum.obsidian.md/u/andypassion)\
**Post date:** [March 9, 2021, 4:48pm UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/5 "2021-03-09T16:48:28Z")

</div>

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

```auto
mermaid
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 😟 ?  
Thanks!

---

<div class="post-metadata">

**Author:** ![3dward](https://forum.obsidian.md/user_avatar/forum.obsidian.md/3dward/32/12625_2.png) [@3dward](https://forum.obsidian.md/u/3dward)\
**Post date:** [August 1, 2021, 2:23pm UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/6 "2021-08-01T14:23:23Z")

</div>

This would be great to solve! 🙂

---

<div class="post-metadata">

**Author:** ![GreenChocho](https://forum.obsidian.md/user_avatar/forum.obsidian.md/greenchocho/32/4942_2.png) [@GreenChocho](https://forum.obsidian.md/u/GreenChocho)\
**Post date:** [August 1, 2021, 4:20pm UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/8 "2021-08-01T16:20:00Z")

</div>

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

You can see the full example [here](https://mermaid-js.github.io/mermaid/#/gantt?id=interaction) (ignore the script part)

---

<div class="post-metadata">

**Author:** ![irasanchez](https://forum.obsidian.md/user_avatar/forum.obsidian.md/irasanchez/32/4178_2.png) [@irasanchez](https://forum.obsidian.md/u/irasanchez)\
**Post date:** [March 6, 2022, 4:52am UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/9 "2022-03-06T04:52:17Z")

</div>

> [@GreenChocho](#):
>
> href “obsidian://vault/YOUR\_VAULT/path\_to\_your\_file.md”

Confirming this works

Example:

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

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

```

This changes the styling text from solid to outline for a quick verification before testing the click itself:  
 ![image](https://forum.obsidian.md/uploads/default/original/3X/b/e/be2838704c6d071c79393560fe4cbb57f4a4f901.png)

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [October 16, 2022, 6:29pm UTC](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/10 "2022-10-16T18:29:19Z")

</div>

Closed on October 16, 2022, 6:29pm UTC


