DiagrammeR
DiagrammeR copied to clipboard
Updates to CRAN?
Hi @rich-iannone Could you push the version of DiagrammeR with the reverted mermaid code and css to CRAN? I have the fixed version available for my students but users installing from CRAN have issues using my apps.
Thanks
mermaid js now have new and exciting features and shapes like these. Would you please just update the mermaid js so that we can use these features as well.
The following step worked for me. I replaced the file in the package library /DiagrammeR/htmlwidgets/lib/mermaid/dist/mermaid.slim.min.js with the file at the link https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js (I don't know if this is the right way to get the latest version of mermaid and if there are any unanticipated side effects). My DiagrammeR version is 1.0.7
Thanks, @notesofdabbler. Worked locally for me. Trying to add a mermaid graph to targets
() and copying that JS file lets me render the graphs locally in R:
library(DiagrammeR)
graph <- "graph LR
classDef built color:black,fill:#E1BD6D;
classDef uptodate stroke-width:0px,color:white,fill:#354823;
classDef outdated stroke-width:0px,color:black,fill:#78B7C5;
classDef started stroke-width:0px,color:black,fill:#DC863B;
classDef canceled stroke-width:0px,color:black,fill:#FAD510;
classDef errored stroke-width:0px,color:white,fill:#C93312;
classDef queued stroke-width:0px,color:black,fill:#D2D2D0;
classDef skipped stroke-width:0px,color:white,fill:#7500D1;
classDef none stroke-width:0px,color:black,fill:#94a4ac;
o{{object}}:::uptodate --> a([static]):::uptodate
f>function]:::uptodate --> a([static]):::outdated
a([static]):::outdated --> b[dynamic<br>branches]:::errored
"
DiagrammeR::mermaid(graph)
graph LR
classDef built color:black,fill:#E1BD6D;
classDef uptodate stroke-width:0px,color:white,fill:#354823;
classDef outdated stroke-width:0px,color:black,fill:#78B7C5;
classDef started stroke-width:0px,color:black,fill:#DC863B;
classDef canceled stroke-width:0px,color:black,fill:#FAD510;
classDef errored stroke-width:0px,color:white,fill:#C93312;
classDef queued stroke-width:0px,color:black,fill:#D2D2D0;
classDef skipped stroke-width:0px,color:white,fill:#7500D1;
classDef none stroke-width:0px,color:black,fill:#94a4ac;
o{{object}}:::uptodate --> a([static]):::uptodate
f>function]:::uptodate --> a([static]):::outdated
a([static]):::outdated --> b[dynamic<br>branches]:::errored
Closing this in favor of https://github.com/rich-iannone/DiagrammeR/issues/475.