@diagrammo/dgmo 0.8.12 → 0.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +115 -719
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/docs/guide/chart-arc.md +71 -0
- package/docs/guide/chart-area.md +73 -0
- package/docs/guide/chart-bar-stacked.md +61 -0
- package/docs/guide/chart-bar.md +62 -0
- package/docs/guide/chart-boxes-and-lines.md +243 -0
- package/docs/guide/chart-c4.md +300 -0
- package/docs/guide/chart-chord.md +43 -0
- package/docs/guide/chart-class.md +204 -0
- package/docs/guide/chart-doughnut.md +38 -0
- package/docs/guide/chart-er.md +218 -0
- package/docs/guide/chart-flowchart.md +102 -0
- package/docs/guide/chart-function.md +56 -0
- package/docs/guide/chart-funnel.md +38 -0
- package/docs/guide/chart-gantt.md +368 -0
- package/docs/guide/chart-heatmap.md +41 -0
- package/docs/guide/chart-infra.md +694 -0
- package/docs/guide/chart-kanban.md +156 -0
- package/docs/guide/chart-line.md +79 -0
- package/docs/guide/chart-multi-line.md +84 -0
- package/docs/guide/chart-org.md +209 -0
- package/docs/guide/chart-pie.md +39 -0
- package/docs/guide/chart-polar-area.md +38 -0
- package/docs/guide/chart-quadrant.md +69 -0
- package/docs/guide/chart-radar.md +38 -0
- package/docs/guide/chart-sankey.md +103 -0
- package/docs/guide/chart-scatter.md +94 -0
- package/docs/guide/chart-sequence.md +332 -0
- package/docs/guide/chart-sitemap.md +248 -0
- package/docs/guide/chart-slope.md +56 -0
- package/docs/guide/chart-state.md +171 -0
- package/docs/guide/chart-timeline.md +229 -0
- package/docs/guide/chart-venn.md +81 -0
- package/docs/guide/chart-wordcloud.md +66 -0
- package/docs/guide/colors.md +283 -0
- package/docs/guide/index.md +55 -0
- package/docs/guide/keyboard-shortcuts.md +49 -0
- package/docs/guide/registry.json +51 -0
- package/gallery/fixtures/boxes-and-lines.dgmo +4 -6
- package/package.json +1 -1
- package/src/sharing.ts +3 -4
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# Sitemap
|
|
2
|
+
|
|
3
|
+
```dgmo
|
|
4
|
+
sitemap The Salty Compass
|
|
5
|
+
|
|
6
|
+
tag Auth
|
|
7
|
+
Public(green)
|
|
8
|
+
Crew Only(blue)
|
|
9
|
+
|
|
10
|
+
Home | Auth: Public
|
|
11
|
+
-shop-> Shop
|
|
12
|
+
-voyages-> Upcoming Voyages
|
|
13
|
+
-join crew-> Sign Up
|
|
14
|
+
-sign in-> Login
|
|
15
|
+
|
|
16
|
+
[Ship Store]
|
|
17
|
+
Shop | Auth: Public
|
|
18
|
+
-> Eye Patches
|
|
19
|
+
-> Flags & Banners
|
|
20
|
+
Eye Patches | Auth: Public
|
|
21
|
+
-add to chest-> Cart
|
|
22
|
+
Flags & Banners | Auth: Public
|
|
23
|
+
-add to chest-> Cart
|
|
24
|
+
Cart | Auth: Public
|
|
25
|
+
-checkout-> Checkout
|
|
26
|
+
Checkout | Auth: Crew Only
|
|
27
|
+
-done-> My Orders
|
|
28
|
+
|
|
29
|
+
[Voyages]
|
|
30
|
+
Upcoming Voyages | Auth: Public
|
|
31
|
+
-details-> Voyage Detail
|
|
32
|
+
Voyage Detail | Auth: Public
|
|
33
|
+
-enlist-> Sign Up
|
|
34
|
+
|
|
35
|
+
[Crew Quarters]
|
|
36
|
+
Login | Auth: Public
|
|
37
|
+
-welcome aboard-> Dashboard
|
|
38
|
+
-new pirate-> Sign Up
|
|
39
|
+
Sign Up | Auth: Public
|
|
40
|
+
-welcome aboard-> Dashboard
|
|
41
|
+
Dashboard | Auth: Crew Only
|
|
42
|
+
-> My Orders
|
|
43
|
+
My Orders | Auth: Crew Only
|
|
44
|
+
-reorder-> Shop
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Overview
|
|
48
|
+
|
|
49
|
+
Sitemap diagrams visualize website structure as a hierarchy of pages. Indentation defines the parent-child relationship between pages. Pages can be grouped into containers, connected with arrows, and annotated with metadata and color-coded tag groups.
|
|
50
|
+
|
|
51
|
+
## Syntax
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
sitemap Site Title
|
|
55
|
+
|
|
56
|
+
Page Name
|
|
57
|
+
Child Page
|
|
58
|
+
Grandchild Page
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Settings
|
|
62
|
+
|
|
63
|
+
| Key | Description | Default |
|
|
64
|
+
| -------------- | --------------------------------------------- | -------- |
|
|
65
|
+
| `chart` | Must be `sitemap` | — |
|
|
66
|
+
| `title` | Diagram title | None |
|
|
67
|
+
| `direction-tb` | Top-to-bottom layout (omit for left-to-right) | off (LR) |
|
|
68
|
+
| `hide` | Comma-separated metadata to hide | None |
|
|
69
|
+
|
|
70
|
+
## Pages
|
|
71
|
+
|
|
72
|
+
Each line of text creates a page node. Indentation creates child pages:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Home
|
|
76
|
+
About
|
|
77
|
+
Products
|
|
78
|
+
Enterprise
|
|
79
|
+
Starter
|
|
80
|
+
Contact
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Groups (Containers)
|
|
84
|
+
|
|
85
|
+
Use `[Group Name]` to create a visual container that groups its children:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Home
|
|
89
|
+
[Product Section]
|
|
90
|
+
Products
|
|
91
|
+
Pricing
|
|
92
|
+
Demo
|
|
93
|
+
|
|
94
|
+
[Support Section]
|
|
95
|
+
Help Center
|
|
96
|
+
Documentation
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Containers render as labeled boxes. They can have their own metadata.
|
|
100
|
+
|
|
101
|
+
## Arrows
|
|
102
|
+
|
|
103
|
+
Add arrows between pages using `->` syntax indented under a page:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
Home
|
|
107
|
+
-> Products
|
|
108
|
+
-explore-> Blog
|
|
109
|
+
Products
|
|
110
|
+
Pricing
|
|
111
|
+
-upgrade(green)-> Enterprise
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
- `-> Target` — plain arrow
|
|
115
|
+
- `-label-> Target` — labeled arrow
|
|
116
|
+
- `-label(color)-> Target` — labeled and colored arrow
|
|
117
|
+
|
|
118
|
+
## Metadata
|
|
119
|
+
|
|
120
|
+
Add key-value pairs indented under a page:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
Home
|
|
124
|
+
status: Live
|
|
125
|
+
owner: Marketing
|
|
126
|
+
|
|
127
|
+
Products
|
|
128
|
+
status: Draft
|
|
129
|
+
owner: Product Team
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Metadata renders as secondary text on the page card.
|
|
133
|
+
|
|
134
|
+
### Pipe Syntax
|
|
135
|
+
|
|
136
|
+
For concise entries, use `|` to put metadata on a single line:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
Home | status: Live | owner: Marketing
|
|
140
|
+
Products | status: Draft | owner: Product Team
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Node Colors
|
|
144
|
+
|
|
145
|
+
Add a color name in parentheses after a page or group name:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
Home(blue)
|
|
149
|
+
[Admin Section(red)]
|
|
150
|
+
Dashboard
|
|
151
|
+
Settings
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Tag Groups
|
|
155
|
+
|
|
156
|
+
Define color-coded tags for metadata values. Tag groups must appear before page content:
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
sitemap Company Site
|
|
160
|
+
|
|
161
|
+
tag Status
|
|
162
|
+
Live(green)
|
|
163
|
+
Draft(yellow)
|
|
164
|
+
Deprecated(red)
|
|
165
|
+
|
|
166
|
+
tag Owner
|
|
167
|
+
Marketing(blue)
|
|
168
|
+
Engineering(purple)
|
|
169
|
+
|
|
170
|
+
Home
|
|
171
|
+
status: Live
|
|
172
|
+
owner: Marketing
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
- `tag GroupName` starts a tag group
|
|
176
|
+
- When a tag group is active, pages are colored by their matching tag value
|
|
177
|
+
- Click a tag group pill to activate it; click the eye icon to toggle that metadata's visibility on cards
|
|
178
|
+
|
|
179
|
+
## Direction
|
|
180
|
+
|
|
181
|
+
The default layout is left-to-right. Add `direction-tb` to switch to top-to-bottom:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
sitemap
|
|
185
|
+
direction-tb
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Collapse / Expand
|
|
189
|
+
|
|
190
|
+
In the app, click a page or group that has children to focus it. Click again to collapse its subtree — a "+N" label shows how many nodes are hidden. Click once more to expand.
|
|
191
|
+
|
|
192
|
+
Keyboard: Tab to focus a node, Enter or Space to toggle.
|
|
193
|
+
|
|
194
|
+
## Comments
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
// This line is ignored by the parser
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Complete Example
|
|
201
|
+
|
|
202
|
+
```dgmo
|
|
203
|
+
sitemap The Salty Compass
|
|
204
|
+
|
|
205
|
+
tag Auth
|
|
206
|
+
Public(green)
|
|
207
|
+
Crew Only(blue)
|
|
208
|
+
|
|
209
|
+
tag Status
|
|
210
|
+
Live(cyan)
|
|
211
|
+
Coming Soon(yellow)
|
|
212
|
+
|
|
213
|
+
Home | Auth: Public | Status: Live
|
|
214
|
+
-shop-> Shop
|
|
215
|
+
-voyages-> Upcoming Voyages
|
|
216
|
+
-join crew-> Sign Up
|
|
217
|
+
-sign in-> Login
|
|
218
|
+
|
|
219
|
+
[Ship Store]
|
|
220
|
+
Shop | Auth: Public | Status: Live
|
|
221
|
+
-> Eye Patches
|
|
222
|
+
-> Flags & Banners
|
|
223
|
+
Eye Patches | Auth: Public | Status: Live
|
|
224
|
+
-add to chest-> Cart
|
|
225
|
+
Flags & Banners | Auth: Public | Status: Coming Soon
|
|
226
|
+
-add to chest-> Cart
|
|
227
|
+
Cart | Auth: Public | Status: Live
|
|
228
|
+
-checkout-> Checkout
|
|
229
|
+
Checkout | Auth: Crew Only | Status: Live
|
|
230
|
+
-done-> My Orders
|
|
231
|
+
|
|
232
|
+
[Voyages]
|
|
233
|
+
Upcoming Voyages | Auth: Public | Status: Live
|
|
234
|
+
-details-> Voyage Detail
|
|
235
|
+
Voyage Detail | Auth: Public | Status: Live
|
|
236
|
+
-enlist-> Sign Up
|
|
237
|
+
|
|
238
|
+
[Crew Quarters]
|
|
239
|
+
Login | Auth: Public | Status: Live
|
|
240
|
+
-welcome aboard-> Dashboard
|
|
241
|
+
-new pirate-> Sign Up
|
|
242
|
+
Sign Up | Auth: Public | Status: Live
|
|
243
|
+
-welcome aboard-> Dashboard
|
|
244
|
+
Dashboard | Auth: Crew Only | Status: Live
|
|
245
|
+
-> My Orders
|
|
246
|
+
My Orders | Auth: Crew Only | Status: Live
|
|
247
|
+
-reorder-> Shop
|
|
248
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Slope Chart
|
|
2
|
+
|
|
3
|
+
```dgmo
|
|
4
|
+
slope Pirate Fleet Strength: 1715 vs 1725
|
|
5
|
+
|
|
6
|
+
period 1715 1725
|
|
7
|
+
|
|
8
|
+
Blackbeard 40 4
|
|
9
|
+
Bartholomew Roberts 12 52
|
|
10
|
+
Charles Vane 20 2
|
|
11
|
+
Anne Bonny 8 15
|
|
12
|
+
Calico Jack 18 6
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Syntax
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
slope Chart Title
|
|
19
|
+
|
|
20
|
+
period Period1 Period2
|
|
21
|
+
|
|
22
|
+
Label value1 value2
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
For multi-token period labels, use an indented block:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
period
|
|
29
|
+
Before COVID
|
|
30
|
+
After COVID
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Data Format
|
|
34
|
+
|
|
35
|
+
The `period` directive defines the period labels (minimum 2 required). Data rows are space-separated with no colons:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
period 2020 2025
|
|
39
|
+
|
|
40
|
+
Product A 40 80
|
|
41
|
+
Product B 70 30
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Lines slope upward for increases and downward for decreases.
|
|
45
|
+
|
|
46
|
+
## Color Annotations
|
|
47
|
+
|
|
48
|
+
Add `(color)` after the label to set a custom color:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Python (blue) 3 1 1
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Thousands Commas
|
|
55
|
+
|
|
56
|
+
Values can contain thousands commas: `Revenue 1,000 2,500`
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# State Diagram
|
|
2
|
+
|
|
3
|
+
```dgmo
|
|
4
|
+
state Order Lifecycle
|
|
5
|
+
|
|
6
|
+
[*] -> Pending
|
|
7
|
+
|
|
8
|
+
Pending
|
|
9
|
+
-submit-> Validating
|
|
10
|
+
|
|
11
|
+
Validating
|
|
12
|
+
-approved-> Processing
|
|
13
|
+
-rejected-> Cancelled
|
|
14
|
+
|
|
15
|
+
[Fulfillment]
|
|
16
|
+
Processing
|
|
17
|
+
-pack-> Shipping
|
|
18
|
+
-out of stock-> Cancelled
|
|
19
|
+
|
|
20
|
+
Shipping
|
|
21
|
+
-delivered-> Delivered
|
|
22
|
+
-lost-> Refunded
|
|
23
|
+
|
|
24
|
+
[Resolution]
|
|
25
|
+
Delivered
|
|
26
|
+
-return request-> Returning
|
|
27
|
+
|
|
28
|
+
Returning
|
|
29
|
+
-received-> Refunded
|
|
30
|
+
|
|
31
|
+
Cancelled -> [*]
|
|
32
|
+
Refunded -> [*]
|
|
33
|
+
Delivered -> [*]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Overview
|
|
37
|
+
|
|
38
|
+
State diagrams model states and transitions. Write states as plain text and connect them with `->` arrows. Diagrammo handles the layout automatically. Use `[*]` for start/end pseudostates and indent lines to chain transitions from a parent state.
|
|
39
|
+
|
|
40
|
+
## Syntax
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
state Diagram Title
|
|
44
|
+
direction-tb
|
|
45
|
+
|
|
46
|
+
[*] -> Idle
|
|
47
|
+
Idle -event-> Active
|
|
48
|
+
Active -> [*]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Settings
|
|
52
|
+
|
|
53
|
+
| Key | Description | Default |
|
|
54
|
+
| -------------- | ----------------------------------------------- | ------- |
|
|
55
|
+
| `chart` | Must be `state` | — |
|
|
56
|
+
| `title` | Diagram title | None |
|
|
57
|
+
| `direction-tb` | Top-to-bottom layout (default is left-to-right) | `TB` |
|
|
58
|
+
|
|
59
|
+
## States
|
|
60
|
+
|
|
61
|
+
Write state names as plain text. States are created automatically when referenced:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Idle -> Active -> Done
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Pseudostates
|
|
68
|
+
|
|
69
|
+
Use `[*]` for start and end points. They render as filled circles:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
[*] -> Idle
|
|
73
|
+
Done -> [*]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Transitions
|
|
77
|
+
|
|
78
|
+
Connect states with `->`. Add labels between dashes:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Idle -> Active
|
|
82
|
+
Idle -start-> Active
|
|
83
|
+
Active -finish(green)-> Done
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Indent-Based Source Inference
|
|
87
|
+
|
|
88
|
+
Indent transitions under a state heading to chain them from that state:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Idle
|
|
92
|
+
-start-> Active
|
|
93
|
+
-reset-> Stopped
|
|
94
|
+
Active
|
|
95
|
+
-> Done
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This is equivalent to writing `Idle -start-> Active`, `Idle -reset-> Stopped`, and `Active -> Done`.
|
|
99
|
+
|
|
100
|
+
### Transition Chains
|
|
101
|
+
|
|
102
|
+
Chain multiple states on a single line:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
[*] -> Idle -> Active -> Done -> [*]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## State Colors
|
|
109
|
+
|
|
110
|
+
Add a color name in parentheses after a state label:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Active(green) -> Error(red)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Transition Colors
|
|
117
|
+
|
|
118
|
+
Add a color in parentheses inside the arrow label:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Idle -go(green)-> Active
|
|
122
|
+
Active -fail(red)-> Error
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Groups
|
|
126
|
+
|
|
127
|
+
Use bracket syntax `[Name]` to visually group states into regions. States indented under the bracket line belong to the group. The group closes when indentation returns to the bracket's level or below:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
state
|
|
131
|
+
|
|
132
|
+
[Happy Path](green)
|
|
133
|
+
[*] -> Processing -> Approved -> [*]
|
|
134
|
+
|
|
135
|
+
[Error Handling](red)
|
|
136
|
+
Processing -fail-> Rejected -> [*]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Groups render as labeled background boxes with optional colors.
|
|
140
|
+
|
|
141
|
+
## Comments
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
// This line is ignored by the parser
|
|
145
|
+
[*] -> Idle
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Complete Example
|
|
149
|
+
|
|
150
|
+
```dgmo
|
|
151
|
+
state Order of the Jolly Roger
|
|
152
|
+
|
|
153
|
+
[*] -> Docked
|
|
154
|
+
Docked
|
|
155
|
+
-set sail-> At Sea
|
|
156
|
+
At Sea
|
|
157
|
+
-spot treasure-> Treasure Hunt
|
|
158
|
+
-enemy ship!-> Battle
|
|
159
|
+
Treasure Hunt
|
|
160
|
+
-found gold-> Celebrating
|
|
161
|
+
-empty chest-> At Sea
|
|
162
|
+
Battle
|
|
163
|
+
-victory!-> Plundering
|
|
164
|
+
-retreat!-> At Sea
|
|
165
|
+
Plundering
|
|
166
|
+
-> Celebrating
|
|
167
|
+
Celebrating
|
|
168
|
+
-rum's gone-> At Sea
|
|
169
|
+
-retire-> Docked
|
|
170
|
+
-mutiny!-> [*]
|
|
171
|
+
```
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Timeline
|
|
2
|
+
|
|
3
|
+
```dgmo
|
|
4
|
+
timeline The Golden Age of Piracy (1716–1722)
|
|
5
|
+
scale on
|
|
6
|
+
|
|
7
|
+
tag Pirate alias p
|
|
8
|
+
Blackbeard(red)
|
|
9
|
+
Bonny & Rackham(purple)
|
|
10
|
+
Roberts(blue)
|
|
11
|
+
|
|
12
|
+
tag Outcome alias o
|
|
13
|
+
Victory(green)
|
|
14
|
+
Defeat(red)
|
|
15
|
+
Uncertain(yellow) default
|
|
16
|
+
|
|
17
|
+
tag Theatre alias t
|
|
18
|
+
Caribbean(teal) default
|
|
19
|
+
Atlantic(blue)
|
|
20
|
+
Africa(orange)
|
|
21
|
+
|
|
22
|
+
era 1716->1718 Nassau Republic
|
|
23
|
+
era 1719->1722 Roberts Era
|
|
24
|
+
|
|
25
|
+
marker 1718-07 Woodes Rogers arrives (orange)
|
|
26
|
+
marker 1721-08 Roberts reaches peak (teal)
|
|
27
|
+
|
|
28
|
+
1716->1717 Sails under Hornigold | p: Blackbeard, o: Victory
|
|
29
|
+
1717-11->1718-06 Commands Queen Anne's Revenge | p: Blackbeard, o: Victory, t: Atlantic
|
|
30
|
+
1718-05 Blockades Charleston harbor | p: Blackbeard, o: Victory
|
|
31
|
+
1718-11-22 Killed at Ocracoke | p: Blackbeard, o: Defeat
|
|
32
|
+
1718->1719 Rackham builds crew in Nassau | p: Bonny & Rackham, o: Victory
|
|
33
|
+
1719-03->1720-10? Bonny & Rackham raid together | p: Bonny & Rackham
|
|
34
|
+
1720-11 Rackham hanged at Port Royal | p: Bonny & Rackham, o: Defeat
|
|
35
|
+
1719-06->1720 Raids West African coast | p: Roberts, o: Victory, t: Africa
|
|
36
|
+
1720->1722 Captures 400+ ships | p: Roberts, o: Victory, t: Atlantic
|
|
37
|
+
1722-02-10 Killed at Cape Lopez | p: Roberts, o: Defeat, t: Africa
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Syntax
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
timeline Chart Title
|
|
44
|
+
sort group
|
|
45
|
+
|
|
46
|
+
era YYYY->YYYY Era Name
|
|
47
|
+
|
|
48
|
+
marker YYYY-MM-DD Marker Label (color)
|
|
49
|
+
|
|
50
|
+
[Group Name](color)
|
|
51
|
+
YYYY->YYYY Span event description
|
|
52
|
+
YYYY-MM-DD Point event description
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Metadata Keys
|
|
56
|
+
|
|
57
|
+
| Key | Description | Required |
|
|
58
|
+
| ----------- | ----------------------------------------------------------------------------------------------------- | -------- |
|
|
59
|
+
| `chart` | Must be `timeline` | Yes |
|
|
60
|
+
| `title` | Chart title displayed above the chart | No |
|
|
61
|
+
| `sort` | Event ordering: `time` (default), `group`, `tag`, or `tag:GroupName` | No |
|
|
62
|
+
| `swimlanes` | Show shaded backgrounds per group (boolean; `no-swimlanes` to disable). Works best with `sort group`. | No |
|
|
63
|
+
|
|
64
|
+
## Event Format
|
|
65
|
+
|
|
66
|
+
### Point Events
|
|
67
|
+
|
|
68
|
+
A single date followed by a description:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
1718-11-22 Killed at Ocracoke
|
|
72
|
+
1720-11 Rackham hanged at Port Royal
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Span Events
|
|
76
|
+
|
|
77
|
+
A date range (start -> end) followed by a description:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
1717-11->1718-06 Commands Queen Anne's Revenge
|
|
81
|
+
1720->1722 Captures 400+ ships
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Duration Events
|
|
85
|
+
|
|
86
|
+
Instead of specifying an end date, you can use a duration:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
2026-07-15->30d Film release window
|
|
90
|
+
2026-06-01->2w Festival run
|
|
91
|
+
2026-01->6m Award season
|
|
92
|
+
2026->2y Franchise arc
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Supported duration units:
|
|
96
|
+
|
|
97
|
+
| Unit | Meaning |
|
|
98
|
+
| ---- | ------- |
|
|
99
|
+
| `d` | Days |
|
|
100
|
+
| `w` | Weeks |
|
|
101
|
+
| `m` | Months |
|
|
102
|
+
| `y` | Years |
|
|
103
|
+
|
|
104
|
+
Decimals are supported (up to 2 places):
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
2026-01->1.25y Fifteen months (1 year + 3 months)
|
|
108
|
+
2026-01->0.5y Half year (6 months)
|
|
109
|
+
2026-01-01->1.5m Six weeks (1 month + 15 days)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The end date is calculated automatically and preserves the precision of the start date.
|
|
113
|
+
|
|
114
|
+
### Uncertain End Dates
|
|
115
|
+
|
|
116
|
+
Use `->?` to indicate an uncertain or approximate end date. The bar will fade out over the last 20%:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
2026-07-15->?3m Project Alpha
|
|
120
|
+
2026-01->?1.5y Long-term initiative
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This visually communicates that the end date is an estimate rather than a fixed deadline.
|
|
124
|
+
|
|
125
|
+
### Date Precision
|
|
126
|
+
|
|
127
|
+
Dates support three levels of precision:
|
|
128
|
+
|
|
129
|
+
- Year: `1718`
|
|
130
|
+
- Year-Month: `1718-05`
|
|
131
|
+
- Year-Month-Day: `1718-11-22`
|
|
132
|
+
|
|
133
|
+
## Eras
|
|
134
|
+
|
|
135
|
+
Background shaded regions that span a time range:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
era 1716->1718 Nassau Republic
|
|
139
|
+
era 1719->1722 Roberts Era
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Markers
|
|
143
|
+
|
|
144
|
+
Notable moments displayed as a dashed vertical line with a diamond indicator:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
marker 1718-11-22 Blackbeard Killed (red)
|
|
148
|
+
marker 1720-11 Trial at Port Royal (orange)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Markers are not associated with groups and appear above all events. They're useful for highlighting key dates that span across all timeline tracks.
|
|
152
|
+
|
|
153
|
+
## Groups
|
|
154
|
+
|
|
155
|
+
Use `[Group Name](color)` headers to organize events into colored tracks:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
[Blackbeard](red)
|
|
159
|
+
1716->1717 Sails under Hornigold
|
|
160
|
+
1718-11-22 Killed at Ocracoke
|
|
161
|
+
|
|
162
|
+
[Roberts](blue)
|
|
163
|
+
1719-06->1720 Raids West African coast
|
|
164
|
+
1722-02-10 Killed at Cape Lopez
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Tag Groups
|
|
168
|
+
|
|
169
|
+
Tag groups let you color and organize events by metadata categories like team, priority, or status — independent of the timeline's structural groups.
|
|
170
|
+
|
|
171
|
+
### Declaring Tag Groups
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
tag Team
|
|
175
|
+
Engineering(blue)
|
|
176
|
+
Design(green)
|
|
177
|
+
QA(orange)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Each entry has a name and a color. You can add `default` to an entry to apply it to untagged events when the group is active:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
tag Priority
|
|
184
|
+
High(red)
|
|
185
|
+
Medium(yellow) default
|
|
186
|
+
Low(gray)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Tagging Events
|
|
190
|
+
|
|
191
|
+
Add `| key: value` metadata after any event line:
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
2024-01->2024-06 Build API | Team: Engineering
|
|
195
|
+
2024-03->2024-05 UX Review | Team: Design, Priority: High
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Multiple tags can be separated by commas.
|
|
199
|
+
|
|
200
|
+
### Tag-Based Swimlanes
|
|
201
|
+
|
|
202
|
+
Use `sort: tag` or `sort: tag:GroupName` to arrange events into swimlanes by tag value:
|
|
203
|
+
|
|
204
|
+
```dgmo
|
|
205
|
+
timeline Project Roadmap
|
|
206
|
+
sort tag:Team
|
|
207
|
+
|
|
208
|
+
tag Team
|
|
209
|
+
Engineering(blue)
|
|
210
|
+
Design(green)
|
|
211
|
+
QA(orange)
|
|
212
|
+
|
|
213
|
+
tag Priority
|
|
214
|
+
High(red)
|
|
215
|
+
Medium(yellow)
|
|
216
|
+
Low(gray)
|
|
217
|
+
|
|
218
|
+
2024-01->2024-06 Build API | Team: Engineering, Priority: High
|
|
219
|
+
2024-03->2024-05 UX Review | Team: Design, Priority: Medium
|
|
220
|
+
2024-04->2024-07 Integration Tests | Team: QA, Priority: High
|
|
221
|
+
2024-02->2024-04 Design System | Team: Design, Priority: Low
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
- `sort tag` — uses the first declared tag group for swimlanes
|
|
225
|
+
- `sort tag:GroupName` — uses a specific tag group (aliases work: `sort tag:t` resolves to `sort tag:Team`)
|
|
226
|
+
|
|
227
|
+
### Interactive Legend
|
|
228
|
+
|
|
229
|
+
When tag groups are declared, a legend appears above the chart. Click a tag group pill to activate it — events are colored by that group's values. The swimlane tag group controls the spatial layout; the active tag group controls the coloring. These can be set independently.
|