# Internal-links gantt in mermaid

**URL:** <https://forum.obsidian.md/t/internal-links-gantt-in-mermaid/72312>\
**Category:** Help\
**Tags:** mermaid, internal-links\
**Created:** [December 2, 2023, 6:54am UTC](https://forum.obsidian.md/t/internal-links-gantt-in-mermaid/72312 "2023-12-02T06:54:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dderom](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/d/c68b51/32.png) [@dderom](https://forum.obsidian.md/u/dderom)\
**Post date:** [December 2, 2023, 6:54am UTC](https://forum.obsidian.md/t/internal-links-gantt-in-mermaid/72312/1 "2023-12-02T06:54:59Z")

</div>

### What I’m trying to do

Create a GANTT or a diagram with  
Mermaid does not naturally comes with links, but one can tweak as explained in the [docs](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram).

These work indeed for graph. Gantts however do not seem to work. There is a solution mentioned a [year ago](https://forum.obsidian.md/t/how-to-set-internal-links-in-gantt-chart/13903/5). But that requires defining all links by ‘hardcoding’ them, which is quite a task if you refer to a lot of headings in notes.

But that does not work anylonger for me, links not through the note. Further more, it does not allow to mention headings, and is tedious.

### Things I have tried

- Adding classes to gantt chart does not work
- Adding `click taskid` is hard given many headings

---

<div class="post-metadata">

**Author:** ![Chateau](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@Chateau](https://forum.obsidian.md/u/Chateau)\
**Post date:** [December 30, 2023, 3:09am UTC](https://forum.obsidian.md/t/internal-links-gantt-in-mermaid/72312/2 "2023-12-30T03:09:27Z")

</div>

Would love to figure this out, specially when using dataviewjs to generate the mermaid gantt chart.

---

<div class="post-metadata">

**Author:** ![renatomen](https://forum.obsidian.md/user_avatar/forum.obsidian.md/renatomen/32/32745_2.png) [@renatomen](https://forum.obsidian.md/u/renatomen)\
**Post date:** [March 16, 2024, 5:17am UTC](https://forum.obsidian.md/t/internal-links-gantt-in-mermaid/72312/3 "2024-03-16T05:17:06Z")

</div>

In my case, even if I use click with “href” and an external url, it doesn’t work

Both examples below work fine in Mermaid’s live editor online ([https://mermaid.live](https://mermaid.live)), including internal obsidian links.

But when I paste them in obsidian, the Gantt chart nodes show as links and the mouse pointer changes accordingly. However, clicking on the nodes doesn’t do anything.

This one uses a link to google

````auto
```mermaid
gantt
dateFormat YYYY-MM-DD

Example Task: active, ExampleTask, 2022-12-04, 3d

click ExampleTask href "https://google.com"

```

````

## This one uses a link to obsidian

````auto
```mermaid
gantt
dateFormat YYYY-MM-DD

Example Task: active, ExampleTask, 2022-12-04, 3d

click ExampleTask href "obsidian://open?vault=TestVault&file=TestInbox/testGanttDoc.md"

```

````

### Mermaid Live Opens the Obsidian Link just fine

 ![image](https://forum.obsidian.md/uploads/default/original/3X/3/d/3d388d8bc5b8e1ef808b494cef509425059a6250.png)

Unfortunately, obsidian doesn’t 😢

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [June 14, 2024, 5:17am UTC](https://forum.obsidian.md/t/internal-links-gantt-in-mermaid/72312/4 "2024-06-14T05:17:46Z")

</div>

Closed on June 14, 2024, 5:17am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
