terrastruct / d2

D2 is a modern diagram scripting language that turns text to diagrams.
https://d2lang.com
Mozilla Public License 2.0
17.07k stars 422 forks source link

How can I write a diagram like this? #1689

Open Czyhandsome opened 1 year ago

Czyhandsome commented 1 year ago

Here is the diagram I want to draw:

graph

The idea is that I cut the full text into multiple parts, and we combine the previous result with the next part to generate the next result. How can I use D2 syntax to draw a graph with this idea?

Czyhandsome commented 1 year ago

I just checked out from the docs, I found that the grid diagrams (https://d2lang.com/tour/grid-diagrams) can control the node position as my desire, unfortunately it does not support links among grid nodes. Also there's no such thing as "connect" a connection to a node, so I can not create a "triple" link where the link between two linked nodes link to another node. Is there any built-in workarounds for that?

Plawn commented 10 months ago

@Czyhandsome It should work with the new grid updates I think