innovationOUtside / ipython_magic_eralchemy

IPython magic to display ERDs / entity relationship diagrams produced by eralchemy
MIT License
2 stars 0 forks source link

Double border around tables #3

Open psychemedia opened 6 years ago

psychemedia commented 6 years ago

In TM351VM, tables are rendering inside another, bordered table.

09_2_creating_foreign_keys2

Changing the node definition in eralchemy from:

node [label="\N",
        shape=plain
    ];

to

node [label="\N",
        shape=plaintext
    ];

removes the border but leaves a gap:

09_2_creating_foreign_keys
psychemedia commented 6 years ago

One possible fix round this is to patch eralchemy to generate dot file that uses a simple record:

"table1" [label="Table 1|col1 [TEXT]\n*col2[INTEGER]", shape = "record"];
09_2_creating_foreign_keys3

Another is to set shape=record or shape=plain margin=0 width=0 height=0 and then style the table with no border:

"table2" [label=<<FONT FACE="Helvetica"><table border="0"><TR>...
09_2_creating_foreign_keys4

Setting table border 1 and cellborder 1, we can also have two row tables to distinguish table name and cols, then separate the cols with
tags.

09_2_creating_foreign_keys5