Skip to content

Direct linetype #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kusaleev opened this issue Jan 27, 2020 · 4 comments
Closed

Direct linetype #42

kusaleev opened this issue Jan 27, 2020 · 4 comments
Labels
Can't Fix Issue lies outside of this project.
Milestone

Comments

@kusaleev
Copy link

Hi!

Currently, 2 types of relationships are supported (skinparam linetype):

  • Standard (when elements are loosely connected and arrows (skinparam linetype disabled))
    -ortho (when the bend angles of the arrows are at right angles (skinparam linetype ortho))

Is it possible to establish a “direct” connection style when each element is connected and the arrows do not bend?

@adrianvlupu
Copy link
Member

Hi,
Other than actually using skinparam linetype ortho or skinparam linetype polyline, the best way I can think of is adding hidden relationships using the Lay_U, Lay_D, etc. helpers and trying to convince graphviz to draw it a certain way. (depends a lot on the complexity of the diagram though)

So instead of:

@startuml
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/release/1-0/C4_Container.puml

Person(customer, "Personal Banking Customer", "A customer of the bank, with personal bank accounts.")
System(banking_system, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
System_Ext(mail_system, "E-mail system", "The internal Microsoft Exchange e-mail system.")

Rel(customer, banking_system, "Uses")
Rel(banking_system, mail_system, "Sends e-mail using")

Rel(customer, mail_system, "Sends e-mails to")
@enduml

rendering like this
C4_Context Diagram Sample - bigbankplc-landscape

you could try to force drawing the entities in a rectangle shape like

@startuml
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/release/1-0/C4_Container.puml

skinparam linetype polyline

Person(customer, "Personal Banking Customer", "A customer of the bank, with personal bank accounts.")
System(banking_system, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
System_Ext(mail_system, "E-mail system", "The internal Microsoft Exchange e-mail system.")

Rel(customer, banking_system, "Uses")
Rel(banking_system, mail_system, "Sends e-mail using")
Rel(customer, mail_system, "Sends e-mails to")

Lay_R(customer, mail_system)
@enduml

C4_Context Diagram Sample - bigbankplc-landscape

It's more of a PlantUML issue though.

@kusaleev
Copy link
Author

@adrianvlupu

Thank you for your answer!

I know this hack from C4 styles:)
I hoped, than something else can resolve my problem with lines direction.
Okay, I will playing with layout and relations on my scheme.

@stale
Copy link

stale bot commented Nov 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Nov 22, 2020
@Potherca Potherca added Can't Fix Issue lies outside of this project. and removed wontfix This will not be worked on labels Nov 22, 2020
@Potherca
Copy link
Member

Closing as this issue lies in the upstream project PlantUML and can not be fixed in this repo.

@Potherca Potherca added this to the v2.0.0 milestone Apr 4, 2021
@Potherca Potherca moved this to Todo in All Projects Jul 3, 2022
@Potherca Potherca moved this from Todo to Done in All Projects Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can't Fix Issue lies outside of this project.
Projects
Status: Done
Development

No branches or pull requests

3 participants