terrastruct / d2

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

Horizontal relationships in flowcharts #260

Open KucharczykL opened 1 year ago

KucharczykL commented 1 year ago

Hello,

I want to create a family tree with a flowchart but not being able to specify a horizontal relationship in flowcharts makes this much harder/impossible to look good.

I am aware that none of the other diagramming tools support this but would it be possible to support it in d2 itself?

For reference: https://github.com/mermaid-js/mermaid/issues/1747

alixander commented 1 year ago

can you try making one with the layout engine TALA? i suspect it might look close to what you want. The direction might not go top-down though, but this will be specifiable in the next release:

https://github.com/terrastruct/d2/pull/251

KucharczykL commented 1 year ago

Thank you for the suggestion! I've tried creating a simple family tree but the result is far from ideal, unfortunately:

file

Source:

sonwife: Son's Wife
sondaughter: Son's Daughter

father -> son1
mother -> son1

father -> son2
mother -> son2

father -> daughter
mother -> daughter

son1 -> sondaughter
sonwife -> sondaughter
alixander commented 1 year ago

yes, agreed. terrible. we'll work on this, ty for reporting