nidi3 / graphviz-java

Use graphviz with pure java
Apache License 2.0
937 stars 107 forks source link

How to create different node with the same text? #135

Closed LeeReindeer closed 4 years ago

LeeReindeer commented 4 years ago

Is there any method to create some different node refs with the same text?

For example:

    Graph graph = graph().directed()
        .with(node("a").link(node("a")));

Result: test1

What I want:

test2

nidi3 commented 4 years ago

Use the Label attribute: node("1").with(Label.of("a")).link(node("2").with(Label.of("a")))

LeeReindeer commented 4 years ago

Cool thanks