class-diagram color composition or aggregation line

0 votes
asked Nov 13, 2023 in Question / help by anonymous
In a class diagram if I do a

foo -[#red]-> bar

then I get a red line with an arror between foo and bar.

But if I do a

foo *[#red]-- bar

this doesn't work eventhough

foo *-- bar

is valid syntax.

1 Answer

+1 vote
answered Nov 14, 2023 by albert (3,520 points)

In the example:

foo -[#red]-> bar

 we see that the color is between the 2 dashes. In your example

foo *[#red]-- bar

the color is between the asterisk and the dash and when using

foo *-[#red]- bar

so between the 2 dashes again, it works.

...