Closed saantiaguilera closed 4 years ago
thank you for reporting this. I will have a look at the changes for this, hopefully it does not require a breaking one.
No worries. As a temporary fix I'm doing:
s := graph.Subgraph(somethingUnique, dot.ClusterOption{})
s.Attr("label", "The same label I want for more subgraphs")
This way your map uses somethingUnique
for indexing the subgraphs but the DOT label used is "The same label I want for more subgraphs"
The module has been updated with the fix, please use v0.10.2
In DOT language, the ID is something apart from the label attribute. You are indexing the map by labels instead of by IDs.
This makes us unable to create subgraphs with a same label (but different IDs).
Solution
Probably you should be indexing your
g.subgraphs
byg.ID
instead ofg.Attr("label")