0
votes

I am trying to build a GraphViz Graphic using Java (guru.nidi.graphviz.parse.Parser) with nodes in clusters but for every try of building I get the error messages.

20:26:25.983 [main] INFO guru.nidi.graphviz.parse.Parser - ERROR label at 51:3 Attribute is not allowed for scope 'SUB_GRAPH'.

and

20:26:25.987 [main] INFO guru.nidi.graphviz.parse.Parser - ERROR color at 53:1 Attribute is not allowed for scope 'SUB_GRAPH'.

my code exists of the beginning

digraph g { 
graph [bgcolor=grey15, fontcolor=grey70]; 
node [color=grey70,style=filled, fontcolor=grey15, fontsize=18]; 
edge [color=grey70,fontcolor=grey70, fontsize=18fontsize=18]; 

then some node and edge definitions like

"lorem" [label="lorem"]; 
"foo bar" -> "lorem"; 
"ipsum" [shape=diamond]; 
...

and at the end a definition of some subgraph-clusters:

subgraph Foos{
  label="Foos";
  {rank=same "lorem"; "foo bar"; }
color=blue; 
}
...

The clustering works (the nodes of a cluster are next to each other. When I add Edge-connections between the subgraph-braccets with the subgraph nodes they get displayed.)

I orientated myself at the GraphVIZ-dotguide(Page 23) and these Graphviz-dot-examples ("Subgraph (clusters)" section). So maybe someone can help me with this problem?

Thanks much!

1
Is it possible that you're missing some code? The errors seem to be related with the data format, so there could be an error in the previous lines of the file (if any). Also, what are the lines that it's complaining about? (51 and 53) - Pipetus

1 Answers

0
votes

Nevermind, I did not imagine it is that easy. If I started my subgraphname with cluster like clusterFoos instead of Foos then it works how it shoud.