teoz produces odd legend for sequence diagrams

0 votes
asked Dec 16, 2023 in Bug by kirchsth (7,140 points)
edited Dec 18, 2023 by kirchsth

Hello,

if I add a legend to a sequence diagram and use the teoz layout the legend is too wide and the text/background y-offset does not match

If I deactivate teoz, or draw another diagram type then everything looks ok.
It can be reproduced with following sample

@startuml

!pragma teoz true
' if you remove the comment of following line it looks ok
' !pragma teoz false

c1 -> c2 : call5
' Or if a component diagram is drawn
' [A]->[N]

legend
<#transparent,#transparent>|<color:#000000>**Legend**</color> |
|<#438DD5><color:#3C7FC0> <U+25AF></color> <color:#FFFFFF> container</color> |
|<#85BBF0><color:#78A8D8> <U+25AF></color> <color:#000000> component</color> |
|<#transparent><color:#444444> <U+25AF></color> <color:#444444> container boundary</color> |
endlegend
@enduml

I rendered it
a) locally on my Windows machine (I used plantuml-mit-1.2023.13.jar that I avoided GraphViz problems too).
b) or via docker image plantuml/plantuml-server:jetty.

Thank you and best regards
Helmut

PS.: orig C4 issue

commented Dec 21, 2023 by The-Lu (74,900 points)

Hi K., and all,

[Just for the record] See similar issue here:

Regards,
Th.

commented Dec 23, 2023 by kirchsth (7,140 points)
edited Dec 23, 2023 by kirchsth

Hi Th.

in https://github.com/plantuml/plantuml/issues/1575 the error is "Creole" related
but it can be reproduced with normal text too (I reproduced it via the docker image).

@startuml
!pragma teoz true

' Sequence has wrong layout
 c1 -> c2 : call5
' Component has correct layout
'[A]->[N]

legend
|ABCDEFGHI|
endlegend

@enduml


Could it be that the legend size is calculated based on a wrong font?
sequenz too wide but
BR Helmut

commented Jan 9 by AV
moved Jan 9

Looks like the issue arised between versions 1.2023.5 (OK) and 1.2023.6 (too wide).

OS: Windows, graphviz v9.0.0

plantuml-1.2023.4.jar  ✅
plantuml-1.2023.5.jar  ✅
plantuml-1.2023.6.jar  ❌(too wide)
...
plantuml-1.2023.13.jar (too wide)
snapshot 1.2024.0beta1 (too wide)

Sample diagram:

@startuml
participant A
participant B

note across
%version()
| Item1 | 1 | 3 |
| Item2 | 2 | 4 |
end note
@enduml
commented Jan 27 by kirchsth (7,140 points)
Is fixed in v1.2024.0beta3  (details see  https://github.com/plantuml/plantuml/issues/1575 )

2 Answers

+1 vote
answered Jan 29 by kirchsth (7,140 points)
 
Best answer

Is fixed in v1.2024.0beta3  (details see  https://github.com/plantuml/plantuml/issues/1575 )

0 votes
answered Jan 29 by The-Lu (74,900 points)

Hello K,

  • Could you change your comment to an answer?

[Just to have an answer to a resolved question]

As mentioned by you:

Is fixed in v1.2024.0beta3  (details see  https://github.com/plantuml/plantuml/issues/1575 )

Regards,
Th.

...