Open jmriego opened 3 years ago
Hi,
The entities are placed in a way as GraphViz finds it appropriate to render. A specifically desired placement is probably difficult to achieve, influencing the placement may be possible: there could be parameters on the API of GraphViz but those are not supported directly by erd.
Maybe you could apply post processing on the dot format which can be obtained by using erd with the -d
switch? For instance:
erd -i ./simple.er -d -f plain
would produce:
graph 1 4.125 1.9306
node Person 0.80556 0.96528 1.6111 1.9306 "Person|name|height|weight|birth\ date|birth_place_id" solid record black lightgrey
node "Birth Place" 3.375 0.96528 1.5 1.6111 "Birth\ Place|id|birth\ city|birth\ state|birth\ country" solid record black lightgrey
edge Person "Birth Place" 4 1.6115 0.96528 1.9353 0.96528 2.3064 0.96528 2.6244 0.96528 dashed gray50
stop
thanks @mmzx ! that looks indeed like an option
I am trying to understand how this works. I was looking at a similar program https://github.com/ehne/ERDot and it seems like they accept the rankAdjustments
parameter to adjust this. Not sure if they can influence GraphViz directly or they do something else like modifying the positions directly
It'd be really nice if ERD allowed to manually define the layout (at least in part). This feature is available e.g. in t2erd. With large diagrams the current output of ERD is, in practice, often unusable. This is basically the same problem as in #105.
Just providing a complete example of using dot to do postprocessing as @mmzx described --
layout_engine=osage
docker run --rm -i ghcr.io/burntsushi/erd:latest -d -f dot < "foo.er" | dot -K$layout_engine -Tpng > foo.png
Hi! I was wondering if it's possible to organise the models in some way. When I don't add any relationships the models are stacked vertically but I'd prefer to change that if possible. If not, at least some hints to set the models left or right of the diagram would be useful
Thanks!