Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Aug 9, 2024
1 parent f1cbd79 commit b4af42b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
50 changes: 50 additions & 0 deletions docs/syntax/gantt.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,56 @@ gantt
```

> **Warning** > `millisecond` and `second` support was added in v10.3.0
>
> ### Changing Today (v\<MERMAID_RELEASE_VERSION>+)
>
> By default, the today marker uses the current date. Use `today` to set a custom date, using the `dateFormat`.
>
> ```mermaid-example
> gantt
> title A Gantt Diagram With Custom Today
> dateFormat YYYY-MM-DD
> today 2024-01-20
> section Section
> A task :a1, 2024-01-01, 30d
> Another task :after a1, 20d
> ```
You can also use a duration:
```mermaid-example
---
displayMode: compact
---
gantt
title A Gantt Diagram With Custom Today (Duration)
dateFormat x
axisFormat %L ms
today 18ms
todayMarker stroke-width:2px,stroke:#FF0,opacity:0.5
section Graphics
Draw 1: a1, 0, 28ms
Draw 2: after a1, 20ms
section Compute
Kernel: b1, 20, 12ms
```
```mermaid
---
displayMode: compact
---
gantt
title A Gantt Diagram With Custom Today (Duration)
dateFormat x
axisFormat %L ms
today 18ms
todayMarker stroke-width:2px,stroke:#FF0,opacity:0.5
section Graphics
Draw 1: a1, 0, 28ms
Draw 2: after a1, 20ms
section Compute
Kernel: b1, 20, 12ms
```

## Output in compact mode

Expand Down
4 changes: 2 additions & 2 deletions packages/mermaid/src/docs/syntax/gantt.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ gantt
weekday monday
```

```warning
````warning
`millisecond` and `second` support was added in v10.3.0
### Changing Today (v\<MERMAID_RELEASE_VERSION>+)
Expand All @@ -266,7 +266,7 @@ gantt
section Section
A task :a1, 2024-01-01, 30d
Another task :after a1, 20d
```
````

You can also use a duration:

Expand Down

0 comments on commit b4af42b

Please sign in to comment.