DiagrammeR
DiagrammeR copied to clipboard
mermaid doesn't generate flowchart
I have tried generating mermaid flowchart (https://mermaid-js.github.io/mermaid/#/flowchart?id=node-shapes):
mermaid("
flowchart LR
id1[(Database)]
")
and just got the text inside the quotes.
Same here, I have just updated from 1.0.6.1 to 1.0.9 and visNetwork from 2.0.9 to 2.1.0.
I updated the mermaid.js bundle that is installed on the package by running this:
dist_loc <- list.files(
find.package("DiagrammeR"),
recursive = TRUE,
pattern = "mermaid.*js",
full.names = TRUE
)
js_cdn_url <- "https://cdnjs.cloudflare.com/ajax/libs/mermaid/9.0.1/mermaid.min.js"
download.file(js_cdn_url, dist_loc)
Got it to work after that. I believe the existing bundle that ships with the package is outdated.
Is there also a way to use the newest version 10.1.0? It seem to have no mermaid.min.js
file anymore (see e.g. here)? I tried to replace line 7 with
js_cdn_url <- "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs"
but this did not work.
Indeed, the bundled mermaid.js is outdated. Duplicate of #475