What is the skinparam that changes the font size/style used for cardinalities in class diagrams?

0 votes
asked Aug 2, 2018 in Question / help by mhaaz (200 points)

Is there such a skinparam, ideally one that doesn't also afect other elements of the class diagram? I cannot seem to find it when looking at http://plantuml.com/skinparam

2 Answers

0 votes
answered Aug 2, 2018 by albert (3,520 points)

The output of the command:

java -Djava.awt.headless=true -jar plantuml.jar  -language

will give you a list of the language elements used by plantuml. Here there is a section skinparameter, have a look through this list.

commented Aug 3, 2018 by mhaaz (200 points)
Isn't that the same list I would find in the doc I checked above? :)
commented Aug 3, 2018 by albert (3,520 points)
That should be the case, but the documentation is / might be lagging a bit.
0 votes
answered Aug 3, 2018 by plantuml (295,000 points)
There are no such skinparam. We are out of inspiration about naming this yet-another skinparameter. Any suggestion is welcome !
commented Aug 3, 2018 by mhaaz (200 points)
Understandable :)
Since I'm not sure whether the "Arrow..." skinparams apply to the relations in class diagrams or also to some other diagram types, and based on the annotations in the third diagram [here](1), I offer you the following conservative suggestions in order of my personal preference:

RelationFont{Size,Style,Color,Name}   (since I think Class prefix makes sense for something that is in a class diagram, you might disagree since it's not part of the class)

(1): https://www.uml-diagrams.org/class-diagrams-overview.html
commented Aug 3, 2018 by plantuml (295,000 points)
Actually, "Arrow..." apply to class diagram. So you can have:

skinparam ArrowFontColor red
car "1" o-- "*" wheel : in red


But you cannot set independently cardinality settings (1 and * in the example).
Maybe we can have a ArrowCardinalityFontColor ? (this is where we are out-of-inspiration :-)
commented Aug 3, 2018 by mhaaz (200 points)
ArrowCardinalityFont{...} sounds pretty good. It's not very inspired, but clear and descriptive.
I only worry that this skinparam Arrow might be used in other diagrams types, for example sequence ... and then the "Cardinality" part just doesn't make sense. In this case, for semantic clarity, I would suggest separating the skinparams for the "class arrows" into a skinparam group "Relation{...}" - since that is what a line/arrow in a class diagram represents. The "sequence arrows" would then be "Message{...}" skinparam group (again, abstracting from the way it's drawn - an arrow - into what the arrow semantically represents in that diagram: a message passed).

Thanks for your continued work, and for letting users suggest names! :)