rich-iannone / DiagrammeR

Graph and network visualization using tabular data in R
https://rich-iannone.github.io/DiagrammeR/
Other
1.68k stars 247 forks source link

Render mermaid code #477

Closed YangTSY closed 7 months ago

YangTSY commented 1 year ago

Hi there,

I am having trouble to render more complicated graph in R with DiagrammeR. I was just wondering if the grammar and formatting between mermaid.js and mermaid in DiagrammeR are the same? If not, where can I find a guide to translate one from another?

Many thanks.

Below are some sample codes that works in Mermaid Online Editor:


flowchart LR

subgraph T1["Automated QA Progress on Fiscal Numbers"] direction LR A --> B B --> C

end

subgraph A["1. Data Preparation"] direction TB N1["Download PDF files \n 2007-2022"] --> N2["Import PDFs"] N2 --> |by lines and pages|N3["Raw data"] N3 --> |Tidy strings|N4["Processed raw data"]

end

subgraph B["2. Data Transformation"] direction TB N7["Import 26 Primary keys"] -->|"from the speadsheet model"|N8["Filtered data"] N9["Processed raw data"] --> |"filter out irrelevant strings"|N8 end

subgraph C["3. Extract Fiscal Figures"] N10["Filtered data"] --> |process by key|N11["Tidy Data"] N11 --> |"index strings with page numbers"|N12["Data by year & \n page numbers"] N12 --> N14["Export indexed data"] N11 --> |"generate group variables"|N13["Group variables"] N11 --> N15["Export the full data"] N13 --> N15

end


rich-iannone commented 7 months ago

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