label on line

0 votes
asked Mar 10, 2019 in Question / help by Barsom (120 points)
reshown Mar 12, 2019 by Barsom
I'm writing context diagram
the text on the line are getting away from its line
how to make it stick with the line

here is my code looks weird, as am trying some hacks :D to make it fit

*   @startuml

left to right direction

skinparam linetype ortho

component [\n\n\n\\n\n\n\n\n\nRTE\n\n\n\n\n\n\n\n\n] as rte

component [\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nBlwrD\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n] as blwr

component [Std_Types] as types

component [PWM] as pwm

component [\n\n\n\n\n\nPWM\n\n\n\n\n\n] as lpwm

component [\n\n\n\n\n\nICU\n\n\n\n\n\n] as icu

skinparam wrapMessageWidth 100

rte --> blwr : BlwrD_vidInit

rte --> blwr : BlwrD_enuSetSpeed

rte --> blwr : BlwrD_vidUpdateBlowerStatus

rte --> blwr : BlwrD_vidRunnableUpdtUnfiltered

rte --> blwr : BlwrD_vidRunnableUpdtFiltered

blwr --> types : Standard Type Definitions

blwr --> icu : Icu_StartSignalMeasurement

blwr --> icu : Icu_GetDutyCycleValues

blwr --> icu : Icu_GetInputState

blwr --> lpwm : LPWM_vidCalculateOutDuty

blwr --> lpwm : LPWM_vidCalculateInPeriod

blwr --> lpwm : LPWM_vidCalculateInDuty

blwr --> pwm : Pwm_SetDutyCycle

*   @enduml

1 Answer

+1 vote
answered Mar 11, 2019 by zimchaa (1,020 points)


So I think you're referring to a small bug with the way that skinparam linetype ortho works:

linetype ortho

- where the label stays where it would be if the linetype was the default line type, so - if you can do without straight lines, e.g.

no linetype ortho

Or for the full diagram:

no linetype ortho

Then the label is closer to the line - however, this doesn't look as good as your view, so I would suggest showing the connections as single lines and then getting the detail in a timing or sequence diagram perhaps?