Skip to content

Commit

Permalink
fix(edge): misaligned label text position
Browse files Browse the repository at this point in the history
  • Loading branch information
mingrammer committed Jun 28, 2020
1 parent 4c377a0 commit 91a2910
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions diagrams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def subgraph(self, dot: Digraph) -> None:
self.dot.subgraph(dot)

def render(self) -> None:
self.dot.render(format=self.outformat, view=self.show)
self.dot.render(format=self.outformat, view=self.show, quiet=True)


class Cluster:
Expand Down Expand Up @@ -445,7 +445,8 @@ def __init__(

if label:
# Graphviz complaining about using label for edges, so replace it with xlabel.
self._attrs["xlabel"] = label
# Update: xlabel option causes the misaliend label position: https://github.com/mingrammer/diagrams/issues/83
self._attrs["label"] = label
if color:
self._attrs["color"] = color
if style:
Expand Down

0 comments on commit 91a2910

Please sign in to comment.