Closed jonassmedegaard closed 9 months ago
For short, there is no bug here.
displayMode
is not a Quarto YAML option thus has no effect, see https://quarto.org/docs/authoring/diagrams.html.
Also note that the "frontmatter config" is only available in mermaid.js v10.4.0. While Quarto 1.4 pre-release embed mermaid.js v10.2.0-rc.2 and Quarto 1.3 embed mermaid.js v9.1.1.
When Quarto will embed mermaid.js v10.4.0 or above you will be able to write the following but now you can't.
---
title: "Mermaid Gantt Diagram"
---
```{mermaid}
---
displayMode: compact
---
gantt
excludes weekends
tickInterval 1month
axisFormat %e. %b.
section All
Event: 2023-09-01, 2m
Event: 2023-10-01, 2m
Do you know if Quarto will include displayMode: compact
in the forseeable future?
Thanks in advance
A.
For short, there is no bug here.
displayMode
is not a Quarto YAML option thus has no effect, see https://quarto.org/docs/authoring/diagrams.html.Also note that the "frontmatter config" is only available in mermaid.js v10.4.0. While Quarto 1.4 pre-release embed mermaid.js v10.2.0-rc.2 and Quarto 1.3 embed mermaid.js v9.1.1.
When Quarto will embed mermaid.js v10.4.0 or above you will be able to write the following but now you can't.
--- title: "Mermaid Gantt Diagram" --- ```{mermaid} --- displayMode: compact --- gantt excludes weekends tickInterval 1month axisFormat %e. %b. section All Event: 2023-09-01, 2m Event: 2023-10-01, 2m
Trying to run on quarto 1.4.549
---
title: "Mermaid Gantt Diagram"
---
```{mermaid}
---
displayMode: compact
---
gantt
excludes weekends
tickInterval 1month
axisFormat %e. %b.
section All
Event: 2023-09-01, 2m
Event: 2023-10-01, 2m
yield this error:
``` {bash}
Now using node v18.16.0 (npm v9.5.1)
❯ quarto preview /Users/fredguth/Library/CloudStorage/OneDrive-Personal/Projects/sus/1_Projects/Produto-1/mermaid.qmd --no-browser --no-watch-inputs
Rendering qmd embeds [mermaid.qmd]
FATAL (/Applications/quarto/share/filters/main.lua:2568) An error occurred:
inlinesToString: expected Inlines, got Inline
Error running filter /Applications/quarto/share/filters/main.lua:
/Applications/quarto/share/filters/main.lua:2232: attempt to call a nil value (global 'crash_with_stack_trace')
stack traceback:
/Applications/quarto/share/filters/main.lua:1820: in function 'fail'
/Applications/quarto/share/filters/main.lua:2568: in function 'inlinesToString'
/Applications/quarto/share/filters/main.lua:10458: in function 'columnOption'
/Applications/quarto/share/filters/main.lua:10438: in function 'computeClassesForScopedColumns'
/Applications/quarto/share/filters/main.lua:10264: in function 'resolveColumnClassesForCodeCell'
/Applications/quarto/share/filters/main.lua:10227: in function </Applications/quarto/share/filters/main.lua:10223>
(...tail calls...)
[C]: in ?
[C]: in method 'walk'
/Applications/quarto/share/filters/main.lua:224: in function </Applications/quarto/share/filters/main.lua:214>
(...tail calls...)
/Applications/quarto/share/filters/main.lua:936: in local 'callback'
/Applications/quarto/share/filters/main.lua:954: in upvalue 'run_emulated_filter_chain'
/Applications/quarto/share/filters/main.lua:990: in function </Applications/quarto/share/filters/main.lua:987>
stack traceback:
/Applications/quarto/share/filters/main.lua:224: in function </Applications/quarto/share/filters/main.lua:214>
(...tail calls...)
/Applications/quarto/share/filters/main.lua:936: in local 'callback'
/Applications/quarto/share/filters/main.lua:954: in upvalue 'run_emulated_filter_chain'
/Applications/quarto/share/filters/main.lua:990: in function </Applications/quarto/share/filters/main.lua:987>
is this because of the version of Mermaid Quarto uses? Is there a way to add mermaid gantt charts to Quarto? Where can I see a gantt example?
@fredguth Don't post multiple times the same things across the repository, please.
FYI:
The crash is fixed on main
and the fix will be included in a v1.4 patch release soon.
This will be handled as part of our upgrade chores.
Bug description
Embedded gantt diagram always renders in "expanded" mode.
Steps to reproduce