Wrapping for arrow text

0 votes
asked Dec 28, 2024 in Wanted features by ok3 (180 points)

I would like the WordWrap style to work for arrow label text. Or any other option to wrap arrow labels automatically. This example is of state-diagram, but would be useful for other diagrams also.

```

@startuml

left to right direction

<style>
arrow {
     WordWrap 150
     fontcolor #green
}
</style>

state a
state b

 [*] -> a

 a -> b : very long status transition description that I want to be wrapped but it won't despite I try to use styling for arrow and it affects the arrow label font color

b -> [*]

@enduml
```

1 Answer

0 votes
answered Jan 5 by The-Lu (76,660 points)
selected Jan 8 by ok3
 
Best answer

Hi O.,

Here is a current workaround, using 'skinparam maxMessageSize 150', as:

@startuml
skinparam maxMessageSize 150

<style>
arrow {
  fontcolor #green
}
</style>

state a
state b

[*] --> a
a --> b : very long status transition description that I want to be wrapped but it won't despite I try to use styling for arrow and it affects the arrow label font color
b --> [*]
@enduml

Enjoy,

A wanted feature will be to uniformise all the `wrapWidth`, `maxMessageSize`, `MaximumWidth`, ...

Regards,
Th.

commented Jan 8 by ok3 (180 points)
Thanks a lot, the name of the param is a bit confusing, thought it works for sequence diagrams only.
...