emicklei / dot

Go package for writing descriptions using the Graphviz DOT and Mermaid language
MIT License
282 stars 19 forks source link

support record shape and record label #34

Closed RelicOfTesla closed 1 year ago

RelicOfTesla commented 1 year ago
digraph {
    itemlist [shape=record, label="{item1|item2|item3|item4}"];

    node [shape=record];
    group1 [label="{a|b|c}"];
    group2 [label="{x|{α|β|γ|{L|M|N}}|y|z}"];

    struct1 [label="{<a>int1|<b>int2|<c>int3|<d>int4}"];
    struct2 [label="{<a>int1|<b>int2|<c>int3|<d>int4}"];

    struct1:b -> struct2:b;
    struct1:d -> struct2:a;
    struct1:a:sw -> struct2:d:w;
}
node.Record(dot.IdLabel{Id:"a", Label:"int1"},  dot.MakeIdLabel("b", "int2"),  dot.Label("b"),  "c"  )
node.AppendRecord(....)
emicklei commented 1 year ago

fyi, I started working on it

On Thu, 20 Jul 2023 at 16:10, RelicOfTesla @.***> wrote:

digraph { node [shape=record];

struct1 [label="{ int|float| int}"]; struct2 [label="{int| char| int}"]; struct3 [label="{int| char| int}"];

struct1:next -> struct2:prev; struct2:next -> struct3:prev; struct1:head:s -> int; }

— Reply to this email directly, view it on GitHub https://github.com/emicklei/dot/issues/34, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFHRDEG3O4NOL2M4ZHJGTDXRE36LANCNFSM6AAAAAA2RPYUJM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Met vriendelijke groet, Kind regards,

Ernest Micklei

Try out my music project Melrōse https://melrōse.org