Automatic Gantt Chart from Obsidian Tasks & Dataview

I’m very fond of the Obsidian task plugin, and I wonder how to let Obsidian generate a Gantt Chart automatically from my existing tasks generated from this plugin.

I’ve worked on it for a day and a night trying to figure it out (since there’s no existing solutions to my best Googling effort…).

It’s finally done through a piece of dataviewjs codes.
Gibhub Link here

You may change the path of your project folder at the end of the code. My current path is “00 Life/Project Folder/Research”

However, the tickinterval cannot be adjusted through obsidian… thus when you have a long-term project the chart may not look nice… Hopefully mermaid in Obsidian will improve in the future.


This is great! Such a shame tickinterval can’t be adjusted as it really limits the use of the timeline… (I’m trying to mock up a PhD proposal plan)

Any way to split this by year (ie chart for 2023, 2034, etc) as a workaround whilst tickinterval can’t be adjusted? I’m quite new to dataviewjs so having trouble trying to modify the code…