Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note on Mermaid diagrams #10

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions Content/Diagrams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
User documentation: https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram

Obsidian supports diagrams using [Mermaid](https://mermaid-js.github.io/) syntax. Mermaid supports many diagram types, with just a few examples shown here.
## Diagram types
### Flow chart
```mermaid
flowchart TB
A --> C
A ==> D
B -.-> C
B -- link label--> D
```
### Gantt chart
```mermaid
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Project A
Task 1 :a1, 2014-01-01, 30d
Task 2 :after a1, 20d
section Project B
Task 3 :2014-01-12, 12d
Task 4 :24d
```
### Pie chart
```mermaid
pie title Animal biomass percentage
"Arthropods" : 42
"Fish" : 29
"Annelids" : 8
"Molluscs" : 8
"Cnidarians" : 4
"Livestock" : 4
"Humans" : 2.5
"Nematodes" : 0.8
```
## Links in diagrams
Mermaid diagrams can include links to other notes.
```mermaid
graph TD
Callouts --> Diagrams
Diagrams --> Embeds
Embeds --> Footnotes

class Callouts,Diagrams,Embeds,Footnotes internal-link;
```
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This vault is currently incomplete. Please help update it by submitting pull req
## Content
Examples and notes on styling Markdown content provided by users.
- [[Callouts]]
- [[Diagrams]]
- [[Embeds]]
- [[Footnotes]]
- [[Headings]]
Expand Down