d2 icon indicating copy to clipboard operation
d2 copied to clipboard

Add Crows Feet to Arrowhead options

Open Rjvs opened this issue 2 years ago • 2 comments

Hi, although documentation claims D2 is useful for ERDs, it would be useful to have more options for the arrowheads, such as crows feet.

Rjvs avatar Dec 06 '22 16:12 Rjvs

not opposed to the additional optionality, but we also have arrowhead labels which kind of do the same thing. (https://d2lang.com/tour/connections#arrowheads). i guess i can see it in more formal settings (e.g. academic, database docs, etc)

alixander avatar Dec 08 '22 04:12 alixander

Crow's foot is a more compact and visual notation than labels.

PS: tastefully rendered crow's feet should be small, close to diamonds arrowheads in size.

suhr avatar Dec 21 '22 08:12 suhr

closed by https://github.com/terrastruct/d2/pull/578

@suhr you had an opinion on rendering, how's it look to you?

alixander avatar Jan 03 '23 22:01 alixander

Proportions are rather unusual. Compare with this images:

entity-relationship-diagram-1536x781 php7wjEYw

The first picture is from a database design tool: https://www.datensen.com/blog/er-diagram/crows-foot-notation-in-erd/

suhr avatar Jan 03 '23 23:01 suhr

There's an another example: schema

suhr avatar Jan 03 '23 23:01 suhr

I was trying to replicate it from the blog mentioned in the original post. If there is a need, it can be definitely improved.

martinjirku avatar Jan 04 '23 19:01 martinjirku

yeah i'm interested to see what it looks like in practice.

i don't think the existing implementations out there are the gold standard by any means:

Screen Shot 2023-01-04 at 11 27 40 AM

alixander avatar Jan 04 '23 19:01 alixander