Using Graphviz 2.30.1 version the uml diagram gets broken

0 votes
asked Dec 20, 2021 in Bug by Vennila (120 points)

We have already installed the supported version of Graphviz 2.30.1 in RHEL 7 ,and while checking for RHEL 7 this is only graphviz package so we are correct with the graphviz version ,could you please let us know why this supported version is not working for us.And also there is no upgraded version available for RHEL 7 . We cant directly go with RHEL upgrade ,If we install some other version how we came toknow that will fix the issue .Please note that we will not install any package from 3rd party site.

Please check and let us know what can be done for resolving the issue.

Thanks,

Vennila P

commented Dec 20, 2021 by Vennila (120 points)

1@startuml 2top to bottom direction 3component A 4component AChildLeft 5component AChildRight 6 7A -- AChildLeft 8A -- AChildRight 9 10note as AChildLeftNote 11left comment 12end note 13 14AChildLeft -left- AChildLeftNote 15 16note as AChildRightNote 17right comment 18end note 19 20AChildRight -right- AChildRightNote 21 22@enduml

1 Answer

0 votes
answered Dec 20, 2021 by Martin (8,360 points)

I can reformat that example text for you, in case it speeds anyone else up helping you.

@startuml
top to bottom direction 

component A 
component AChildLeft 
component AChildRight 
 
A -- AChildLeft 
A -- AChildRight 
 
note as AChildLeftNote 
left comment 
end note 
 
AChildLeft -left- AChildLeftNote 
 
note as AChildRightNote 
right comment 
end note 
 
AChildRight -right- AChildRightNote
@enduml

As you would expect, the online server renders correctly:


To be fair your problem is more with RHEL support of Graphviz, than with Plantuml - it is putting RHEL to shame compared to other unix brands - hopefully you are also trying to lobby in that direction too.  I don't know if Plantuml have any appetite to try to work around bugs/differences in such an old version. Have you tried going back even older with Graphviz (eg 2.22) in case it was an issue introduced in 2.30?

I think your best bet is with 'project Smetana' - Plantuml's attempt to rewrite Graphviz in Java.  Adding "!pragma layout smetana" to your example gives an accurate diagram, although it chooses a different order for the two child components (I'm not sure if this is a bug or an expected limitation of conversion).

So maybe a better way forward is to use Smetana and file any bug reports to help improve it.  (I'm not sure if it is still being worked on or is considered complete.)

commented Dec 20, 2021 by Vennila (120 points)
edited Dec 20, 2021 by Vennila

We have tried with the sample code which you shared ,that doesnt work so we have added the code "!pragma layout smetana"  and it works like what you provided in the above screenshot,but user is not accepting since it doesnt give exact output.

Thanks,

Vennila P

...