mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

Arrow of class diagram inheritance arrow missing

Open lfuhr opened this issue 4 years ago • 13 comments

There are two options.

  • Introduce another arrow like --i> , --[>, --o> or --|:>
  • Change the black arrow --|> to be white

What do you think

lfuhr avatar Sep 19 '20 11:09 lfuhr

see #780

WolfgangFahl avatar Jul 12 '21 18:07 WolfgangFahl

see https://en.wikipedia.org/wiki/Class_diagram#/media/File:Uml_classes_en.svg grafik

WolfgangFahl avatar Jul 12 '21 18:07 WolfgangFahl

There are two options.

  • Introduce another arrow like --i> , --[>, --o> or --|:>
  • Change the black arrow --|> to be white

What do you think

I think so Inheritance arraow should fill with white color

fightinggg avatar Jul 21 '21 06:07 fightinggg

+1 Mermaid deviates from most if not all other class diagram visualizations in this regard. It would be great if this could be fixed.

wouterbeek avatar Aug 29 '21 19:08 wouterbeek

The arrow should be hollow (i.e. background color, which isn't necessarily white). For now, I'm using the following workaround in my config.json:

{
    "theme": "dark",
    "themeCSS": ".extension { fill: #1c1e1f !important; }"
}

Before: image

After: image

Unfortunately, one can't use transparent because then the arrows look like this: image

It would be great if Realization and Association/Dependency arrows could be fixed too. The former have a dashed outline, and the latter have an unorthodox tented appearance instead of being just two solid lines.

mvf avatar Sep 11 '21 13:09 mvf

The arrow should be hollow (i.e. background color, which isn't necessarily white).

Indeed. This is confirmed by https://www.uml-diagrams.org/generalization.html:

A generalization is shown as a line with a hollow triangle as an arrowhead between the symbols representing the involved classifiers. The arrowhead points to the symbol representing the general classifier. […]

[…]

… and by the UML 2.5 specification (PDF, section 9.2.4.2 "Other elements" on p. 100) …

A Generalization is shown as a line with a hollow triangle as an arrowhead between the symbols representing the involved Classifiers. The arrowhead points to the symbol representing the general Classifier.

… with examples in section 9.2.5 on the following page:

image

das-g avatar Aug 27 '22 11:08 das-g

Any updates on this one? I like the tool a lot; it's just this inconsistency which makes it harder to use, regarding the solid triangle for inheritance.

michalspano avatar Oct 20 '22 12:10 michalspano

I would really appreciate an fix here. Mermaid is just plain wrong regarding generalization arrows.

skogsbaer avatar Nov 25 '22 16:11 skogsbaer

I think we should make a point what solution developers should go for.

Give me a thumbs up here if you think --|> should be changed to transparent.

lfuhr avatar Nov 26 '22 08:11 lfuhr

Give me a thumbs up here if you think it would be better to Introduce another arrow like --i> , --[>, --o> or --|:>

lfuhr avatar Nov 26 '22 08:11 lfuhr

Give me a thumbs up here if you think It is just fine as it is

lfuhr avatar Nov 26 '22 08:11 lfuhr

UML sets the standard so i think this could be a way to avoid further discussion: grafik

WolfgangFahl avatar Nov 26 '22 09:11 WolfgangFahl

No reason to add a new arrow type at this point. Just to correct the arrow being used. I will look at this.

jgreywolf avatar Mar 16 '23 15:03 jgreywolf