ArrowColor for stereotype not working

+2 votes
asked Aug 30, 2017 in Bug by nikhil (520 points)
skinparam not working with ArrowColor stereotype.

for exampe :

skinparam class {

ArrowColor<<greenColor>> Green

}

is not working. But,

skinparam class {

ArrowColor Green

}

is working.

Is this supported or a bug? Or am I doing anything wrong here?

1 Answer

0 votes
answered Aug 30, 2017 by plantuml (294,960 points)
selected Sep 7, 2017 by nikhil
 
Best answer

The real issue is that stereotypes apply to classes only and not to arrows.

So something like "ArrowColor<<greenColor>> Green" should apply to arrows that are stereotyped to <<greenColor>>, and right now you cannot define stereotype arrows.

We could imagine that "ArrowColor<<greenColor>> Green" would apply if one of the classes connected by the arrow would have <<greenColor>> stereotype.

Is this what you are expecting ?

Putting it differently, in the following example, are you expecting the arrow to be drawn in red ?

@startuml
skinparam class {
    ArrowColor Green
    ArrowColor<<stereo1>> Red
}
class foo1 <<stereo1>>
class foo2 <<stereo1>>
foo1 --> foo2
@enduml

commented Sep 7, 2017 by nikhil (520 points)
Thanks for your reply.

Yes I am expecting the arrow to be in Red color but that is not possible with stereotype.

However, for now I have got the alternative -
foo1 -[#Red]-> foo2

But it would be great if stereotype support for Arrows can also be added. :)
commented Sep 23, 2018 by dmf19 (380 points)
You can improve on this by using a macro.

!define MY_CUSTOM_ARROW -[#Red]->

foo1 MY_CUSTOM_ARROW foo2
...