It's possible to make a note perpendicular to the variable name?

0 votes
asked Feb 27, 2024 in Question / help by alpinb9 (120 points)

Hello,

I'm begginer in PlantUML but I waste some hours to solve my problem, but failed. So i want to ask it here.

I have code

<code>

@startuml

class MyClass {
    -id : int
    -field1 : String
    -field2 : String
    -field3 : String
    -field4 : String
    -field5 : String
}

note as n1
    note for field5
end note

n1 -r.. MyClass::field5

@enduml

</code>

It's look like:

It is possible to make it look like?:

Or even looks like:

the second and third images are of course edited in a graphics program as an example, but I want to make it in PlantUML

If it is possible please tell me, how I can do this

thanks

1 Answer

0 votes
answered Mar 7, 2025 by dickmaley (4,160 points)

I spent way too much time researching this.  It looks like your desired positioning is not available or I just could not figure it out.

The answer is 

image

@startuml

class MyClass {
    -id : int
    -field1 : String
    -field2 : String
    -field3 : String
    -field4 : String
    -field5 : String
}

note as n1
    note for field5
end note

n1 -r.. MyClass::field5

@enduml

...