Hide Class title, Center align Class methods and Decrease arrow distance on Class diagram

0 votes
asked Jan 8 in Question / help by eduardomozart (480 points)
Hello,

I'm trying to reproduce the following image: https://ibb.co/y05xyvk

Right now I have the following diagram:

@startuml
hide stereotype
hide empty members
hide circle
skinparam nodesep 0
skinparam defaultFontName Helvetica

skinparam class {
  FontColor<<srv>> transparent
  BackgroundColor<<srv>> transparent
  BorderColor<<srv>> transparent
}

!define Visio2kNet https://raw.githubusercontent.com/eduardomozart/Visio2000-BasicNetworkShapes3D/main
!include Visio2kNet/puml/Server.puml

class srv1 <<srv>> {
  Servidor 01\n\n<U+0020><U+0020><U+0020><$Server>
}

class srv2 <<srv>> {
  Servidor 02\n\n<U+0020><U+0020><U+0020><$Server>
}

class srv3 <<srv>> {
  Servidor 03\n\n<U+0020><U+0020><U+0020><$Server>
}

class "Base de usuários 01" as a {
<#transparent,#transparent>|jsilva|
|maria|
|pedro|
|paulo|
|zeze|
|mjose|
|ana|
}

class "Base de usuários 02" as b {
<#transparent,#transparent>|jsilva|
|maria|
|mauro|
|zeze|
|mjose|
|ana|
| |
}

class "Base de usuários 03" as c {
<#transparent,#transparent>|jsilva|
|maria|
|cassio|
|laura|
|zeze|
|mjose|
|ana|
}

a -right[hidden]-> b
b -right[hidden]-> c

srv1 -- a
srv2 -- b
srv3 -- c
@enduml

I would like to know if it's possible to center align text on Class diagram, it doesn't seem to respect the 'DefaultTextAlignment' skinparam. The class title seems to be center aligned, so a workaround is:

class "Base de usuários 01\njsilva\nmaria\npedro\npaulo\nzeze\nmjose\nana" as a

But I would like to keep the border line between the Class title and it's methods.

Another question: There's a way to remove/decrease the distance between the arrow on server and the classes as the reference image?
commented Jan 8 by eduardomozart (480 points)
I was able to decrease the distance between the server and it's respective classes by adding the following code to my diagram:

skinparam ranksep 1

skinparam class {
  ArrowColor transparent
}

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...