Block diagrams with associated information

I have improved the Mermaid Flowchart tbx I created before. (Mermaid Flowchart Example
) It can now be generated from the Outline. Subgraphs can also be nested. There may still be some bugs.

MermaidFlowchartFromOutline.tbx (622.3 KB)

How to Use
1. Apply the pMFlowchartContainer prototype to the root note that will serve as the base of the flowchart.
2. Apply the pMFlowchart prototype to all notes under the root.
3. Configure attributes such as note color, links, direction of flowchart and attributes related to R chunks.
4. Select the root note and execute the Make a Flowchart stamp.
5. Notes with child notes will automatically be assigned the pMFlowchartSubgraph prototype. Mermaid code will be added to the $Text of the root note and copied to the clipboard.
6. Execute the Toggle Mermaid Poster stamp to toggle the Poster on or off.

Generated Code of Mermaid Flowchart.

flowchart TD
    A["Something about A"] <--->  B["Something Else Important"]
    B["Something Else Important"]
    C["Relevant Information"] -->|"Causes"| D["Related Topic"]
    C["Relevant Information"] -->|"Relates To"| Sub1["Overarching them A"]
    C["Relevant Information"] -->  D["Related Topic"]
    D["Related Topic"] -->|"Causes"| E["Key Point"]
    E["Key Point"]

 subgraph Sub1["Overarching them A"]
    A
    B
end 

 subgraph Sub2["Overarching them B"]
    C
    D
    E
end 

    Sub1["Overarching them A"] -->|"Interacts with"| Sub2["Overarching them B"]

%% Styles & Links
    style A fill:#009900,color:#000000,stroke:#dc490b,stroke-width:2px
    style B fill:#009900,color:#000000,stroke:#dc490b,stroke-width:2px
    style C fill:#009900,color:#000000,stroke:#dc490b,stroke-width:2px
    style D fill:#009900,color:#000000,stroke:#dc490b,stroke-width:2px
    style E fill:#009900,color:#000000,stroke:#dc490b,stroke-width:2px
    style Sub1 fill:#eeebe9,color:#000000,stroke:#dc490b,stroke-width:2px
    style Sub2 fill:#eeebe9,color:#000000,stroke:#dc490b,stroke-width:2px

Since fine-tuning is not possible, it might become difficult as things get more complex. However, with a moderate number of notes and links, it should produce a reasonably good diagram.

5 Likes