color and direction specification not working together for links

0 votes
asked Jan 27, 2021 in Bug by kasra (1,000 points)

Hello,

we are able to give a direction to a link like this  : 

@startuml

rectangle A

rectangle B

rectangle C

rectangle D

A -l- B 

B -- C

C -r- D

@enduml 

But if we also want to add color to the link then we have a syntax Error.

@startuml

rectangle A

rectangle B

rectangle C

rectangle D

A -l[#ff0000]- B 

B -- C

C -r- D

@enduml 

Best Regards,

Kasra

1 Answer

0 votes
answered Jan 27, 2021 by The-Lu (64,760 points)
selected Jan 27, 2021 by kasra
 
Best answer

Hello K.,

Change just the order:

  1. color first
  2. then direction

Here is the expected result:

@startuml
rectangle A
rectangle B
rectangle C
rectangle D

A -[#ff0000]l- B
B -- C
C -r- D
@enduml


[See on PlantUML online server]

or just, without explicit direction indication, but with short arrow and long arrow:

@startuml
rectangle A
rectangle B
rectangle C
rectangle D

B -[#ff0000] A
B -- C
C - D
@enduml


[See on PlantUML...]

If that can help,
Regards,
Th.

commented Jan 27, 2021 by kasra (1,000 points)
perfect !

thanks for your help.
...