vfrz / DotNetGraph

Create GraphViz DOT graph with .NET / C#
MIT License
93 stars 20 forks source link

Add explicit name parameter #44

Closed kokorins closed 4 months ago

kokorins commented 5 months ago

I would like to cover next case which I'm actively use to minimize the dot files:

digraph name {
    fontsize=48
    bgcolor="transparent"

    rankdir=LR;
    node [shape=box, style="rounded,filled", fillcolor="#333333", fontcolor="#ffffff"];

    {node [fillcolor="#952877"; color="#952877"]; purple} // <- this will be applied to all nodes in same group
    purple [label="Purple background with rounded corners"]
}

I propose to do minimal changes and extend DotNode element to accept any name including ones that needs to be quoted.

kokorins commented 5 months ago

@vfrz Can you please have a look on one small proposal =)

vfrz commented 4 months ago

Sorry for the delay, looks good enough for me! Thanks for the contribution.