fix(edge): misaligned label text position

pull/212/head
mingrammer 5 years ago
parent 4c377a073e
commit 91a2910026

@ -171,7 +171,7 @@ class Diagram:
self.dot.subgraph(dot) self.dot.subgraph(dot)
def render(self) -> None: 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: class Cluster:
@ -445,7 +445,8 @@ class Edge:
if label: if label:
# Graphviz complaining about using label for edges, so replace it with xlabel. # 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: if color:
self._attrs["color"] = color self._attrs["color"] = color
if style: if style:

Loading…
Cancel
Save