-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Rel styling $lineStyle does not work for sequence diagrams #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @papa-vova, A) related to
B) related to BR Helmut |
A) hmmm online everything works here's the code: @startuml
!include <C4/C4_Sequence>
AddRelTag("response", $lineStyle=DashedLine())
Container(a1, "a1")
Container(a2, "a2")
Rel(a1, a2, "request")
Rel(a2, a1, "response", $tags="response")
@enduml |
Can you create attach your *.puml file and create a *.preproc file and attach it too (e.g. if your file is "sequence.puml" then you can generate it with following line) java -jar plantuml-mit-1.2024.7.jar ./sequence.puml
java -jar plantuml-mit-1.2024.7.jar -preproc ./sequence.puml |
Your attached *.preproc file is too small with 1.6kB (many lines are missing, but I don't know why); my local has ~39kB. Can you compile my file? If my file is working on your machine too, I would retype your file manually and check if the new *.puml is working. PS.: I attached my *.preproc output from your file too that you can see the expected result |
For the dotted line problem I have a workaround (but maybe I find a final solution over the weekend) @startuml
!include <C4/C4_Sequence>
' defines a workaround arrow, with the a logical matching name "$response" that it can be used by the $rel argument
!$response = "-->"
....
Rel(a2, a1, "response", $rel = $response) full sample @startuml
!include <C4/C4_Sequence>
' defines a woraround arrow, with the a logical matching name "$response" that it can be used by the $rel argument
!$response = "-->"
AddRelTag("response", $textColor=$ARROW_COLOR, $lineColor=#red, $lineStyle=DashedLine())
System(c4stdlib, C4Version())
Container(a1, "a1")
Container(a2, "a2")
Rel(a1, a2, "request")
' legend not working legend
Rel(a2, a1, "response", $rel = $response)
Rel(a1, a2, "request2", $rel = $response)
' for a working legend you have to define the $tags too
Rel(a2, a1, "response2", $tags="response", $rel = $response)
SHOW_LEGEND()
@enduml |
Based on following check, only the
|
hmmm strange. i have notepad++ as an editor, and the box in win10. the encoding is utf-8
yes i also checked colors & stuff before posting, only the line style seems to be off |
btw i realized that stuff like |
papavova@Thinker:/mnt/c/Users/papa.vova/Downloads$ file rel\ styling\ bug.puml
rel styling bug.puml: ASCII text, with CRLF line terminators does not seem to help (
does not seem to help either (( error's exactly the same as far as i can tell: @startuml
!include <C4/C4_Sequence>
Container(a1, "a1")
Container(a2, "a2")
Rel(a1, a2, "request")
Rel(a2, a1, "response")
@enduml HOWEVER! i did have a jar that was 11Mb instead of 21+! that's what win explorer showed to me anyway. mystery how it even worked. maybe i should fully move to wsl or linux ( thanks anyway |
Hi @papa-vova, @kirchsth Here is a clue, from your screenshot:
If that can help, |
Hi @The-Lum ! Yes I've noticed that, but I can't spot those characters anywhere. Well anyway, here's what i did now:
(PlantUML runs on Win, the shell is on WSL2 which does not have Java, sorry about the mess) |
I still think it is the *.jar file. Could it be that your downloaded *.zip or the unpacked *.puml is blocked?'' PS.: And yes, If the size of your .jar file is wrong then the content is wrong and then also the internal stored <C4/C4:....> could have an issue. |
Oh man, I thought they would not let me move blocked files around, but apparently they do. The size seems to be correct. I am certain the issue is with the jar, i just can't spot it. Could anybody point me to the manual as to how to check the |
They don't seem to have anything except asc pgp stuff. All the googling points to gpg, so maybe i should bite the bullet (and find out where's the public key etc) I am not sure how to use |
I think "certutil" is not the correct tool, therefore I deleted my comment. Did you try to download the *.zip again, *unblock the .zip and then try to extract the file maybe then you have a working version |
downloaded the jar from github, unblocked, moved around, tried to rebuild — still no luck i still think that win is messing with the file somehow either that, or the include file for the sequence has some obscure bug which shows only on windows (?) for the size, they have literally 21.1Mb which this time looks not incorrect ) |
I checked it with win10 too->no problems; Maybe you have to unblock the *.jar file too |
Sorry you are right, the *.zip was the file which you gave me. But back to the original problem: I found already an issue in the forum that sequence diagrams do not support line styles, maybe I get a fast bugfix and then I will update my implementation too. |
The plantuml/plantuml@64ea232 commit may fix it... |
Hi @arnaudroques, |
Hi @papa-vova, $lineStyle works with the last beta5 (below an image, created with the new version). If you download the latest PlantUML beta v1.2024.8beta5 plantuml-mit-SNAPSHOT.jar (and unblock it) then you can test it locally on your machine. (I hope you have no old *.jar file with the same name on your local system , if yes I would try a different license that you have a file with a complete new name). I hope it works for you too. (otherwise you have to wait until the online server is updated; you can check it with following code - the brackets creates a new component and its label is the version number) @startuml
[%version()]
@enduml BR Helmut |
Whoa! thanks ))) the code (the variant with @startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Sequence.puml
AddRelTag("response", $lineStyle=DashedLine())
Container(a1, "a1")
Container(a2, "a2")
Rel(a1, a2, "request")
Rel(a2, a1, "response", $tags="response")
@enduml |
It is fixed with PlantUML v1.2024.8 (beta5) |
Hi! Thank you for a super awesome tool.
I have a line styling issue with sequence diagram.
The code:
produces the following output:

I would expect the response line to be dashed. Am I doing something wrong? can't google up anything helpful.
I am not sure if the line «Only following (extended) relationship specific macros is supported:» from the README forbids styling like this.
For container diagrams the same styling works perfectly well.
Thanks!
p.s.

The text was updated successfully, but these errors were encountered: