How to align text for root rectangle

0 votes
asked Jul 13, 2024 in Question / help by MartinS
I want to have the text in all rectangles aligned to the left. I am not sure why it works for the nested rectangles, but not the root rectangle.

@startuml
skinparam {
  ranksep 10
  nodesep 20
  rectangleBackgroundColor #dae2f3
  rectangleBorderColor #758cb7
  rectangleBorderThickness 2
  rectangleTextAlignment left
  hyperlinkColor #47618e
  hyperlinkUnderline false
}

rectangle "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/msg14.html NewOrderSingle(35=D)]]\lEntry of a new, single leg order" as NewOrderSingle {
  together {
    rectangle "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/cmp1003.html Instrument      ]]\lDefinition of the security                                 " as Instrument
    rectangle "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/cmp1002.html FinancingDetails]]\lInformation related to a financing transaction" as FinancingDetails
  }
  
  together {
    rectangle              "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/cmp2211.html ValueChecksGrp<&action-redo>]]\lList of value types to be checked, e.g. price or notional value" as ValueChecksGrp
    rectangle #line:f25260 "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/cmp1064.html MatchingInstructions]]\lAllow or prevent orders from matching                                   " as MatchingInstructions
  }

  Instrument -[hidden]d- FinancingDetails
  ValueChecksGrp -[hidden]d- MatchingInstructions

}
@enduml

1 Answer

0 votes
answered Jul 17, 2024 by The-Lu (87,280 points)

Hello M.,

Awaiting, full HorizontalAlignment management... Here is a workaround using `\t`, as:

@startuml
skinparam {
  ranksep 10
  nodesep 20
  rectangleBackgroundColor #dae2f3
  rectangleBorderColor #758cb7
  rectangleBorderThickness 2
  rectangleTextAlignment left
  hyperlinkColor #47618e
  hyperlinkUnderline false
}

rectangle "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/msg14.html NewOrderSingle(35=D)]]\lEntry of a new, single leg order\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" as NewOrderSingle {
  together {
    rectangle "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/cmp1003.html Instrument      ]]\lDefinition of the security                                 " as Instrument
    rectangle "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/cmp1002.html FinancingDetails]]\lInformation related to a financing transaction" as FinancingDetails
  }
  
  together {
    rectangle              "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/cmp2211.html ValueChecksGrp<&action-redo>]]\lList of value types to be checked, e.g. price or notional value" as ValueChecksGrp
    rectangle #line:f25260 "<b>[[https://fiximate.fixtrading.org/en/FIX.Latest/cmp1064.html MatchingInstructions]]\lAllow or prevent orders from matching                                   " as MatchingInstructions
  }

  Instrument -[hidden]d- FinancingDetails
  ValueChecksGrp -[hidden]d- MatchingInstructions

}
@enduml

Enjoy,

See also:

Regards,
Th.

...