DiagrammeR icon indicating copy to clipboard operation
DiagrammeR copied to clipboard

Updates to CRAN?

Open vnijs opened this issue 4 years ago • 3 comments

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

vnijs avatar Dec 20 '20 19:12 vnijs

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.

image

vikram-rawat avatar Apr 17 '21 01:04 vikram-rawat

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

notesofdabbler avatar Jan 17 '22 05:01 notesofdabbler

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

wlandau avatar Mar 09 '22 22:03 wlandau

Closing this in favor of https://github.com/rich-iannone/DiagrammeR/issues/475.

rich-iannone avatar Nov 16 '23 15:11 rich-iannone