Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels of ortho edges are misplaced #96

Closed
kukimik opened this issue Mar 19, 2021 · 0 comments · Fixed by #103
Closed

Labels of ortho edges are misplaced #96

kukimik opened this issue Mar 19, 2021 · 0 comments · Fixed by #103

Comments

@kukimik
Copy link
Contributor

kukimik commented Mar 19, 2021

When the edge type is set to ortho, the labels are misplaced. See the label "home" and "away" in the example below.

> erd -i examples/nfldb.er -o out.png -f png -e ortho

misplaced_labels

This is really a Graphviz issue:

agerr(AGWARN, "Orthogonal edges do not currently handle edge labels. Try using xlabels.\n");

Following their suggestion, I tried to use A.XLabel instead of A.Label in this line:

label = A.Label $ A.HtmlLabel $ H.Text $ withLabelFmt " %s " optss []

The labels are now placed correctly, though Graphviz chooses other routes for the edges:

xlabels

So I believe XLabel should be used instead of Label, at least for orthogonal edges. I'm not a Graphviz guru and don't know what are the implications of using xlabels, and whether this needs some extra tweaking. Any suggestions?

@kukimik kukimik changed the title Labels of ortho edges are messed up Labels of ortho edges are misplaced Mar 19, 2021
kukimik added a commit to kukimik/erd that referenced this issue May 18, 2021
@mmzx mmzx closed this as completed in #103 Jan 18, 2024
mmzx pushed a commit that referenced this issue Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant