Is there a way to make a diagram like below in Mermaid?
I have bumped into 2 problems in an attempt to do so in mermaid.
- How to make a node where two sub-nodes are attached together side by side?
- If using subgraph for each node of a sub-node pair, how to maintain direction(orientation) separately between global scope and subgraph scope? It seems like Mermaid ignores the subgraph scope direction(orientation) and applies the global scope direction when a node inside a subgraph is linked to a node inside another subgraph. The following code generates the below. You see that even though the subgraphs' direction is set to be LR, TB from global scope direction is applied.
flowchart TB
subgraph node0
direction LR
node00[data constructor]
node01[pointer]
node00 --adjacent--- node01
end
node01 ---> node10
subgraph node1
direction LR
node10[data]
node11[pointer]
node10 --adjacent--- node11
end