How to make this diagram clearer?

Hello everyone.
I recently discovered this program while looking for a tool to export Salesforce data model diagram into pdf. I have about 55 tables with associated joins between them. When I output the pdf, many lines get jumbled together and become hard to follow from one table to another. I use a salesforce app (ERDGenerator) to create the template and gv file, but I can modify them before outputting the pdf. Would you be able to give me any hints to format these lines in a better way? Thank you kindly.

gv file:
output pdf:

There is also a template (couldn’t attach file because new user in this forum allowed only 2 links):

========== MAIN
digraph G {
graph [rankdir=LR,nodesep=1.0];
node [shape=plaintext,fontsize=14];
edge [arrowhead=crow];
========== CLUSTER

subgraph cluster_{{sequence}} { label = “{{name}}”;
style=“rounded, filled”;
node [style=filled,color=white];


========== ENTITY

{{name}} [label=<



edge [style=solid]
{{from}} → {{to}}

edge [style=dashed]
{{from}} → {{to}}

========== FIELD

Maybe my solution is to simply increase width of the pdf page? How can I do that?

Try changing lines 2 and 3 as follows:

    graph [rankdir=TB nodesep=1.5 ranksep=1.5 splines="ortho"]; 
    node  [shape=plaintext,fontsize=14 fontname=helvetica]; 
  • rankdir=TB will change the layout from “Left to Right” to “Top to Bottom”.
  • nodesep=1.5 and ranksep=1.5 will increase the horizontal and vertical spacing between nodes to 1.5 inches.
  • splines="ortho" will use orthogonal edge routing (i.e. 90 degree angles)
  • fontname=helvetica I think is clearer :slight_smile:

I can’t upload the PDF file I created with these settings, but here is a bitmap preview:

If you want to fine tune the horizontal and vertical spacing of the nodes using DOT:

  • If rankdir=TB (or BT), change ranksep to vary the vertical spacing, and nodesep to vary the horizontal spacing.
  • If rankdir=LR (or RL), change nodesep to vary the vertical spacing, and ranksep to vary the horizontal spacing.

Good luck,

Thank you so much. This helped me a lot. Is there a way to make the corners round, where lines are bending?

There is no way to round the corners of ortho edges like you can do to a node. You can, however, set splines="polyline" to have the edges drawn using line segments instead of curves.

1 Like