Skip to content
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

#134: Legend fill whitespace with SHOW_FLOATING_LEGEND() and Lay_Distance() #143

Merged

Conversation

kirchsth
Copy link
Member

@kirchsth kirchsth commented Apr 12, 2021

With following new macros existing whitespaces can be reused

  • `SHOW_FLOATING_LEGEND(?alias, ?hideStereotype): shows the legend in the drawing area

  • LEGEND(): is the default alias of the created floating legend and can be used in Lay_Distance() call

  • Lay_Distance(from, to, ?distance): Sets the distance between from and to with down alignment (Lay_Distance(from,to,0) equals Lay_D(from, to)). The default alias of the floating legend is LEGEND().

like in the sample based on my extended branch

@startuml
!include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Container.puml

Person(a, "Person A")
Container(b, "Container B", "techn")
System(c, "System C")
Container(d, "Container D", "techn")
Container_Ext(e, "Ext. Container E", "techn")

Rel_R(a, b, "calls")
Rel_D(b, c, "uses")
Rel_D(c, d, "uses")
Rel_R(d, e, "updates")

SHOW_FLOATING_LEGEND()
Lay_Distance(LEGEND(), e, 1)

SHOW_FLOATING_LEGEND(legend2)
Lay_Distance(a, legend2, 1)
@enduml

Compact Legend Layout Sample

techn. details: "legend" is a reserved word and cannot be used as (default) alias, therefore I added the LEGEND() macro

BR Helmut

…() and Lay_Distance() (instead of SHOW_LEGEND_UP(), ..._DOWN(), ..._LEFT(), ..._RIGHT())
…() and Lay_Distance() (3 - legend is reserved; LEGEND() is new default alias)
@kirchsth kirchsth requested a review from Potherca April 21, 2021 21:13
@kirchsth kirchsth changed the title #134: Legend fill whitespace with SHOW_LEGEND_UP(), ..._DOWN(), ..._LEFT(), ..._RIGHT() #134: Legend fill whitespace with SHOW_FLOATING_LEGEND() and Lay_Distance() Apr 21, 2021
@Potherca Potherca added this to the v2.3.0 milestone Apr 23, 2021
@Potherca Potherca linked an issue Apr 23, 2021 that may be closed by this pull request
@stale stale bot added the stale Issue has not been active for 60 days label Jun 22, 2021
@Potherca Potherca added the not-stale Stop issue from being marked stale by bot label Jun 23, 2021
@stale stale bot removed the stale Issue has not been active for 60 days label Jun 23, 2021
@plantuml-stdlib plantuml-stdlib deleted a comment from stale bot Jun 23, 2021
@Potherca Potherca merged commit 24d9735 into plantuml-stdlib:master Jul 4, 2021
@kirchsth kirchsth deleted the feature/141_incl_SHOW_LEGEND_LEFT branch July 4, 2021 14:29
@Potherca Potherca removed the not-stale Stop issue from being marked stale by bot label Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Make legend fill whitespace
2 participants