DiagrammeR icon indicating copy to clipboard operation
DiagrammeR copied to clipboard

mermaid doesn't generate flowchart

Open alexvorobiev opened this issue 3 years ago • 2 comments

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.

alexvorobiev avatar Feb 19 '22 00:02 alexvorobiev

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.

lgaborini avatar Mar 18 '22 11:03 lgaborini

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.

cicdguy avatar Apr 26 '22 16:04 cicdguy

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.

retodomax avatar May 08 '23 08:05 retodomax

Indeed, the bundled mermaid.js is outdated. Duplicate of #475

olivroy avatar Dec 04 '23 14:12 olivroy