graphviz-java icon indicating copy to clipboard operation
graphviz-java copied to clipboard

How to set rankdir with LR?

Open essayZW opened this issue 4 years ago • 2 comments

MutableGraph containerGraph = Factory.mutGraph ()
	.setDirected ( true )
	.graphAttrs ().add ( RankDir.LEFT_TO_RIGHT );

Then i get an error.

Cannot resolve method 'add(guru.nidi.graphviz.attribute.Rank.RankDir)'

What should I do

essayZW avatar Mar 30 '21 14:03 essayZW

Hi @essayZW,

For me, the following works:

g.graphAttrs.add("rankdir", "LR")

frademacher avatar Apr 01 '21 14:04 frademacher

Hi @frademacher Thanks for your help, I solved this problem.

essayZW avatar Apr 01 '21 15:04 essayZW