d2 icon indicating copy to clipboard operation
d2 copied to clipboard

Horizontal relationships in flowcharts

Open KucharczykL opened this issue 3 years ago • 3 comments

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

KucharczykL avatar Nov 29 '22 19:11 KucharczykL

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

alixander avatar Nov 29 '22 19:11 alixander

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

KucharczykL avatar Nov 30 '22 21:11 KucharczykL

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

alixander avatar Nov 30 '22 21:11 alixander