How can I change the size of a single element?

–1 vote
asked Oct 14, 2019 in Question / help by Canellas (170 points)

Hi!

In this class diagram:

@startuml
A *-- B
@enduml

I would like to set the size of A to, for example, twice its current size. Is it possible?

Thanks!

2 Answers

0 votes
answered Dec 9, 2019 by poi (1,200 points)
edited Dec 9, 2019 by poi

This sets the font size of both A and B

@startuml
skinparam ClassFontSize 20
A *-- B
@enduml

https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuIhEpimhI2nAp5LmpaaiBdRBpoi9pgnALJ0ou79KqDBLLN3YSaZDIm4g1G00https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuIhEpimhI2nAp5LmpaaiBdRBpoi9pgnALJ0ou79KqDBLLN3YSaZDIm4g1G00

AFAIK: It's not possible to set the font size for a specific class without affecting all classes.

commented Feb 28, 2020 by Bryan (340 points)
How about changing the size of the element (not the font)? E.g. if I have two classes with different names (e.g A and AVERYLONGNAME), i want them both to show with the same width?
+1 vote
answered Jun 30, 2021 by kirchsth (4,880 points) 1 flag
edited Jun 30, 2021 by kirchsth

You could use creole and modify the display text (e.g. use size),...

@startuml
"<size:30>A" *-- B
@enduml

 

BR Helmut

...