Changes for page KLay Layered Layout Options
Last modified by Richard Kreissig on 2023/09/14 10:20
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,7 +5,3 @@ 1 -{{warning}} 2 -This is preliminary and incomplete documentation. You've been warned. 3 -{{/warning}} 4 - 5 5 KLay Layered supports a whole bunch of layout options. Every single one of them is documented here. 6 6 7 7 **Contents** ... ... @@ -29,6 +29,22 @@ 29 29 )))|=((( 30 30 Default 31 31 ))) 28 +|(% colspan="1" %)(% colspan="1" %) 29 +((( 30 +Additional Port Space 31 +)))|(% colspan="1" %)(% colspan="1" %) 32 +((( 33 +de.cau.cs.kieler.additionalPortSpace 34 +)))|(% colspan="1" %)(% colspan="1" %) 35 +((( 36 +Margins 37 +)))|(% colspan="1" %)(% colspan="1" %) 38 +((( 39 +Nodes 40 +)))|(% colspan="1" %)(% colspan="1" %) 41 +((( 42 +0, 0, 0, 0 43 +))) 32 32 |((( 33 33 Alignment 34 34 )))|((( ... ... @@ -108,7 +108,7 @@ 108 108 109 109 ))) 110 110 |((( 111 -Direction 123 +[[Direction>>doc:||anchor="direction"]] 112 112 )))|((( 113 113 de.cau.cs.kieler.direction 114 114 )))|((( ... ... @@ -115,9 +115,8 @@ 115 115 Enum 116 116 )))|((( 117 117 Parents 118 -)))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %) 119 -((( 120 -RIGHT 130 +)))|((( 131 +UNDEFINED 121 121 ))) 122 122 |(% colspan="1" %)(% colspan="1" %) 123 123 ((( ... ... @@ -327,6 +327,22 @@ 327 327 ((( 328 328 UNDEFINED 329 329 ))) 341 +|(% colspan="1" %)(% colspan="1" %) 342 +((( 343 +Port Spacing 344 +)))|(% colspan="1" %)(% colspan="1" %) 345 +((( 346 +de.cau.cs.kieler.portSpacing 347 +)))|(% colspan="1" %)(% colspan="1" %) 348 +((( 349 +Float 350 +)))|(% colspan="1" %)(% colspan="1" %) 351 +((( 352 +Nodes 353 +)))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %) 354 +((( 355 +10 356 +))) 330 330 |((( 331 331 Priority 332 332 )))|((( ... ... @@ -575,6 +575,25 @@ 575 575 ))) 576 576 |(% colspan="1" %)(% colspan="1" %) 577 577 ((( 605 +[[Linear Segments Deflection Dampening>>doc:||anchor="deflectionDampening"]] 606 +)))|(% colspan="1" %)(% colspan="1" %) 607 +((( 608 +de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening 609 +)))|(% colspan="1" %)(% colspan="1" %) 610 +((( 611 +Float 612 +)))|(% colspan="1" %)(% colspan="1" %) 613 +((( 614 +Parents 615 +)))|(% colspan="1" %)(% colspan="1" %) 616 +((( 617 +0.3 618 +)))|(% colspan="1" %)(% colspan="1" %) 619 +((( 620 +nodePlace=LINEAR_SEGMENTS 621 +))) 622 +|(% colspan="1" %)(% colspan="1" %) 623 +((( 578 578 [[Maximal Iterations>>doc:||anchor="maximalIterations"]] 579 579 )))|(% colspan="1" %)(% colspan="1" %) 580 580 ((( ... ... @@ -597,7 +597,7 @@ 597 597 [[Merge Edges>>doc:||anchor="mergeEdges"]] 598 598 )))|(% colspan="1" %)(% colspan="1" %) 599 599 ((( 600 -de.cau.cs.kieler.klay.layered.merge Ports646 +de.cau.cs.kieler.klay.layered.mergeEdges 601 601 )))|(% colspan="1" %)(% colspan="1" %) 602 602 ((( 603 603 Boolean ... ... @@ -628,7 +628,7 @@ 628 628 true 629 629 )))|(% colspan="1" %)(% colspan="1" %) 630 630 ((( 631 - 677 +layoutHierarchy=true 632 632 ))) 633 633 |((( 634 634 [[Node Layering>>doc:||anchor="nodeLayering"]] ... ... @@ -697,10 +697,6 @@ 697 697 698 698 ))) 699 699 700 -= The Most Important Options = 701 - 702 -**TODO:** Write a bit of documentation about the most important layout options and how to use them, possibly with a simple example or something. 703 - 704 704 = Detailed Documentation = 705 705 706 706 This section explains every layout option in more detail. See [[the KIML documentation>>doc:KIML Layout Options]] for more information on KIML layout options. Those options are only mentioned here if KLay Layered adds some custom behavior. ... ... @@ -731,6 +731,14 @@ 731 731 * INTERACTIVE 732 732 The interactive algorithm tries to reverse edges that already pointed leftwards in the input graph. This requires node and port coordinates to have been set to sensible values. 733 733 776 +== Direction == 777 + 778 + 779 + 780 +{{id name="direction"/}} 781 + 782 +The layout direction influences where the majority of edges in the final layout will point to. With data flow diagrams, this will usually be to the right. With control flow diagrams, it might be downwards. The layout direction defaults to {{code language="none"}}UNDEFINED{{/code}}. This causes KLay Layered to calculate a layout direction based on the {{code language="none"}}ASPECT_RATIO{{/code}} setting. As of now, if the aspect ratio is >=1 (that is, if the diagram should be wider than it is high), the direction is set to {{code language="none"}}RIGHT{{/code}}. Otherwise, it is set to {{code language="none"}}DOWN{{/code}}. 783 + 734 734 == Edge Spacing Factor == 735 735 736 736 ... ... @@ -747,11 +747,18 @@ 747 747 748 748 {{id name="edgeLabelSideSelection"/}} 749 749 750 -{{warning}} 751 -Document! 752 -{{/warning}} 800 +Determines how KLay Layered places edge labels. The following strategies are available: 753 753 754 - 802 +* ALWAYS_UP 803 +Always places edge labels above the edge. 804 +* ALWAYS_DOWN 805 +Always places edge labels below the edge. 806 +* DIRECTION_UP 807 +Places edge labels above edges pointing right, and below edges pointing left. 808 +* DIRECTION_DOWN 809 +Places edge labels below edges pointing right, and above edges pointing left. 810 +* SMART 811 +Uses a heuristic that determines the best edge label placement, also taking the placement of port labels into account. 755 755 756 756 == Feedback Edges == 757 757 ... ... @@ -759,10 +759,16 @@ 759 759 760 760 {{id name="feedbackEdges"/}} 761 761 762 -{{warning}} 763 -Document! 764 -{{/warning}} 819 +Feedback edges are edges that feed the output of a node back to be the input of a previous node. This option controls how feedback edges are routed if port constraints are FREE. This influences how much emphasis is put on feedback edges. 765 765 821 +With feedback edges: 822 + 823 +[[image:attach:feedback_on.png]] 824 + 825 +Without feedback edges: 826 + 827 +[[image:attach:feedback_off.png]] 828 + 766 766 == Fixed Alignment == 767 767 768 768 ... ... @@ -769,11 +769,9 @@ 769 769 770 770 {{id name="fixedAlignment"/}} 771 771 772 -{{warning}} 773 -Document! 774 -{{/warning}} 835 +The BRANDES_KOEPF node placement algorithm computes several different node placements. One of the placements is chosen by the algorithm, usually the one that takes the least amount of space. With this option, a particular result can be chosen. 775 775 776 - 837 +This option should usually be left alone. 777 777 778 778 == Interactive Reference Point == 779 779 ... ... @@ -794,12 +794,26 @@ 794 794 795 795 {{id name="layerConstraint"/}} 796 796 797 -{{warning}} 798 -Document! 799 -{{/warning}} 858 +The layer a node is placed in is usually computed by the layer assignment algorithms. However, sometimes certain nodes need to be placed in the first or in the last layer (for example, nodes that represent inputs from the outside). The layer constraint option can be set on such nodes to do just that. 800 800 801 - 860 +[[image:attach:layer_constraints.png]] 802 802 862 +{{note}} 863 +This option can also be set to {{code language="none"}}FIRST_SEPARATE{{/code}} and {{code language="none"}}LAST_SEPARATE{{/code}}. These are for internal use only and should not have been publicly exposed in the first place. Using them can result in layout problems. 864 +{{/note}} 865 + 866 +== Linear Segments Deflection Dampening == 867 + 868 + 869 + 870 +{{id name="deflectionDampening"/}} 871 + 872 +{{note}} 873 +This is a very advanced layout option that you normally shouldn't worry about. 874 +{{/note}} 875 + 876 +The linear segments node placer can sometimes place nodes in a way that results in unnecessarily large diagrams. This option dampens how much the nodes are moved around. A dampening factor of 1.0 disables dampening and just lets the node placer do what it wants. A more conservative dampening factor of 0.3 (the default) restricts the freedom of the node placer a bit more. 877 + 803 803 == Maximal Iterations == 804 804 805 805 ... ... @@ -824,10 +824,10 @@ 824 824 825 825 {{id name="mergeHierarchyEdges"/}} 826 826 827 -{{warning}} 828 -Document! 829 -{{/warning}} 902 +If hierarchical layout is active, this option is the hierarchical equivalent to //Merge Edges//. If set to true on a compound node, all hierarchy-crossing edges that start or end inside that compound node are eligible for merging. 830 830 904 +[[image:attach:merge_hierarchy_edges.png]] 905 + 831 831 == Node Layering == 832 832 833 833 ... ... @@ -849,10 +849,17 @@ 849 849 850 850 {{id name="nodePlacement"/}} 851 851 852 -{{warning}} 853 -Document! 854 -{{/warning}} 927 +Decides which algorithm is used to compute the y coordinate of each node. This influences the length of edges, the number of edge bends, and the height of the diagram. We have different algorithms available, with different optimization goals: 855 855 929 +* BRANDES_KOEPF 930 +Minimizes the number of edge bends at the expense of diagram size: diagrams drawn with this algorithm are usually higher than diagrams drawn with other algorithms. 931 +* LINEAR_SEGMENTS 932 +Computes a balanced placement. 933 +* BUCHHEIM_JUENGER_LEIPERT 934 +Also computes a balanced placement, but a little faster. 935 +* SIMPLE 936 +Minimizes the area at the expense of... well, pretty much everything else. 937 + 856 856 == Port Anchor Offset == 857 857 858 858 ... ... @@ -859,12 +859,12 @@ 859 859 860 860 {{id name="portAnchor"/}} 861 861 862 -{{warning}} 863 -Document! 864 -{{/warning}} 944 +Since ports have a size, we need a concrete point inside the port that edges should start or end in. In KLay Layered, this is referred to as the //port anchor//. By default, the center of each port is used as its port anchor, but this behavior can be overridden by setting an explicit port anchor. 865 865 866 - 946 +In the following example, the port anchor of the left port was moved upwards, while the port anchor of the second port was moved downwards: 867 867 948 +[[image:attach:port_anchors.png]] 949 + 868 868 == Thoroughness == 869 869 870 870
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 - 94701321 +10750901 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/ 9470132/KLay Layered Layout Options1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/10750901/KLay Layered Layout Options