# ELK Radial

Property | Value
--- | ---
Identifier: | `org.eclipse.elk.radial`
Meta Data Provider: | `options.RadialMetaDataProvider`

## Description

A radial layout provider which is based on the algorithm of Peter Eades published in “Drawing free trees.”, published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.

## Category: Radial

Radial layout algorithms usually position the nodes of the graph on concentric circles.

## Additional Documentation

The Radial layouter which provides an enviroment for individiual radial layout algorithms is devided in different phases of layout.

## Phases

The algorithm we implemented is dividable in 5 consecutive steps, two phases and three alternative intermediate processors. The difference between phases and processors is that phases are essential for the layouter and need an implementation (which is also exchangeable) while processors are optional. The given phases are the node placement phase and the edge routing phase, these suffice to gain a radial layout. The steps of overlap removal, compaction and graph size calculation are the optional steps of the algorithm. In the following all these steps are explained in more detail.

### Node placement

The essential phase of the layouter is the node placement, where the nodes are assigned a position. Currently only one node placement algorithm is implemented that is the one of Eades. As mentioned before it would be possible to swap the node placement algorithm by another one. But it also possible to customize the given algorithm of Eades, but beforehand you should know how the algorithm of Eades works.

#### The Algorithm of Eades

As mentioned Eades provides an algorithm for drawing radial layouts. It was published in “Drawing free trees.”, (published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991). The algorithm he provided can layout trees with nodes of no size. The distance between the single radii is given as a constant input. But how does Eades’s algorithm work: The algorithm starts placing the root node and then continues with placing each node of each subtree. Each subtree is assigned to an annulus wedge, a part of the circle. Each node is then placed in the center of its wedge.
To estimate how big the wedge of each subtree will be, Eades counts the numbers of leaves. The node which shall be placed gets space according to the number of leaves it has compared to the number of leaves all nodes of the same layer have. The first wedge starts at the right of the circle, because polar coordinates are used and there is degree zero. The following examples shall clarify this process:

The right lower nodes receives one quarter of the space, because he has (and is) one leaf. The right upper node has one leaf and receives one quarter and the left node has two leaves that is why it receives two quarters.

#### Customizations

As mentioned the algorithm of Eades do not consider node sizes, therefore we provided an annulus wedge criteria which does. Therefore the available space is not calculated by the number of leaves but by the maximum sum of the length of all node diagonals of a wedge. Another customization is that the first wedge does not start on the right of the circle but on a position which gives a better layout. This means that each node is translated for some degree on the radius. This movement can be used to minimize the edge length or even more valuable, the number of edge crossings.

### Overlap Removal

The overlap removal intermediate processor can be started after the node placement. Due to the node sizes it is still not guaranteed that no overlaps occur, because the radius can be chosen too small. The processor starts with the innermost radius and widens it until no more overlaps on the radius occur. This is repeated for each radius.

### Compaction

The compaction processor strieves to maintain a more compact layout. There are two different approaches implemented. The first is the radial compaction which alters the radii such as the overlap removal. Each radius is contracted as long as no overlap occurs. The second approach is the wedge compaction strategy which compacts nodes of each wedge as much as possible. For each wedge the radii are contracted as much as possible. This leads to the loss of the radius alignment property, but may provide a much more compact layout.

### Graph Size Calculation

To determine the size needed for displaying the graph, it is post-processed. Therefore all nodes are moved into the positive area (beforehand the root node was placed in the origin) and the size of the graph is calculated.

### Edge routing

The last phase is the one of edge routing, which provides a layout for the edges of the graph. Edges are drawn from the center of the source to the center of the target and then clipped such that they do no not overlap the nodes.

### Advanced options

There are some advanced options which shouldn’t stay uncommented. There are advanced options for the node placement optimization strategy as well as for sorting the nodes. The options are marked as advanced because they require additional information to work properly. The current options require the position option(org.eclipse.elk.position) to be set. The original use is given by assuming there exists a relation between nodes in the parent node and the children. Therefore, the position reflects the position of the nodes in the parent node. These options may be adapted to other purposes.

## Supported Options

Option | Default Value
--- | ---
Additional Wedge Space | `false`
Annulus Wedge Criteria | `AnnulusWedgeCriteria.NODE_SIZE`
Center On Root | `false`
Compaction | `CompactionStrategy.NONE`
Compaction Step Size | `1`
Node Label Placement | `NodeLabelPlacement.fixed()`
Node Size Constraints | `EnumSet.noneOf(SizeConstraint)`
Node Size Minimum | `new KVector(0, 0)`
Node Size Options | `EnumSet.of(SizeOptions.DEFAULT_MINIMUM_SIZE)`
Node Spacing | `20`
Omit Node Micro Layout | `false`
Order ID | `0`
Outgoing Edge Angles | `false`
Port Label Placement | `PortLabelPlacement.outside()`
Position | `<not defined>`
Radius | `0.0`
Rotate | `false`
Sorter | `SortingStrategy.NONE`
Target Angle | `0`
Translation Optimization | `RadialTranslationStrategy.NONE`

- Algorithms
- Draw2D Layout
- ELK Box
- ELK DisCo
- ELK Fixed
- ELK Force
- ELK Layered
- ELK Mr. Tree
- ELK Radial
- ELK Randomizer
- ELK Rectangle Packing
- ELK SPOrE Compaction
- ELK SPOrE Overlap Removal
- ELK Stress
- ELK Top-down Packing
- Graphviz Circo
- Graphviz Dot
- Graphviz FDP
- Graphviz Neato
- Graphviz Twopi
- Libavoid
- Layout Options
- Activate Inside Self Loops
- Adapt Port Positions
- Add Unnecessary Bendpoints
- Additional Port Space
- Additional Wedge Space
- Additional Wrapped Edges Spacing
- Alignment
- Allow Non-Flow Ports To Switch Sides
- Angle Penalty
- Animate
- Animation Time Factor
- Annulus Wedge Criteria
- Aspect Ratio
- Bend Points
- BK Edge Straightening
- BK Fixed Alignment
- Box Layout Mode
- Center On Root
- Child Area Height
- Child Area Width
- Cluster Crossing Penalty
- Comment Box
- Comment Comment Spacing
- Comment Node Spacing
- Compaction
- Compaction iterations
- Compaction Step Size
- Compaction Strategy
- Compaction Strategy
- Components Spacing
- Concentrate Edges
- Connected Components Compaction
- Connected Components Compaction Strategy
- Connected Components Layout Algorithm
- Consider Model Order
- Consider Model Order for Components
- Consider Port Order
- Content Alignment
- Correction Factor for Wrapping
- Cost Function for Spanning Tree
- Crossing Counter Node Order Influence
- Crossing Counter Port Order Influence
- Crossing Minimization Strategy
- Crossing Penalty
- Current position of a node in the order of nodes
- Cutting Strategy
- Cycle Breaking Strategy
- DCGraph
- Debug Mode
- Desired Edge Length
- Desired index of node
- Direction
- Direction Congruency
- Direction Priority
- Distance Model
- Distance Penalty When Improving Cuts
- Eades Repulsion
- Edge Center Label Placement Strategy
- Edge Edge Between Layer Spacing
- Edge End Texture Length
- Edge Label Placement
- Edge Label Side Selection
- Edge Label Spacing
- Edge Node Between Layers Spacing
- Edge Node Spacing
- Edge Routing
- Edge Routing Mode
- Edge Spacing
- Edge Thickness
- Edge Type
- Enable Hyperedges From Common Source
- Epsilon
- Expand Nodes
- Favor Straight Edges Over Balancing
- Feedback Edges
- Fill Polyominoes
- Fixed Graph Size
- Fixed Position
- Fixed Shared Path Penalty
- Font Name
- Font Size
- Force Model
- Force Node Model Order
- FR Temperature
- Generate Position and Layer IDs
- Graph Wrapping Strategy
- Greedy Switch Activation Threshold
- Greedy Switch Crossing Minimization
- Greedy Switch Crossing Minimization (hierarchical)
- Hierarchical Sweepiness
- Hierarchy Handling
- Hierarchy Handling (Graphviz Dot)
- High Degree Node Maximum Tree Height
- High Degree Node Threshold
- High Degree Node Treatment
- Horizontal spacing between Label and Port
- Hypernode
- Ideal Nudging Distance
- Improve Cuts
- Improve Hyperedge Routes
- Improve Hyperedge Routes Add/Delete
- Improve Wrapped Edges
- In Layer Predecessor of
- In Layer Successor of
- In new Row
- Individual Spacing
- Individual Spacing (ELK Layered)
- Inline Edge Labels
- Inside Self Loop
- Interactive
- interactive Layout
- Interactive Reference Point
- Iteration Limit
- Iterations
- Iterations Factor
- Junction Points
- Label Angle
- Label Distance
- Label Manager
- Label Manager
- Label Node Spacing
- Label Spacing
- Layer Bound
- Layer Choice Constraint
- Layer Constraint
- Layer ID
- Layer Spacing Factor
- Layout Algorithm
- Layout Ancestors
- Layout Dimension
- Layout Partition
- Layout Partitioning
- Linear Segments Deflection Dampening
- List of Polyominoes
- Long Edge Ordering Strategy
- Manually Specified Cuts
- Margins
- Marks a node as a cluster
- Max Node Promotion Iterations
- Max. Iterations
- Maximal Animation Time
- Merge Edges
- Merge Hierarchy-Crossing Edges
- Minimal Animation Time
- MSD Freedom
- No Layout
- No Model Order
- Node arrangement strategy
- Node Flexibility
- Node Flexibility Default
- Node Label Padding
- Node Label Placement
- Node Layering Strategy
- Node Node Between Layers Spacing
- Node Placement Strategy
- Node Promotion Strategy
- Node Self Loop Spacing
- Node Size Constraints
- Node Size Minimum
- Node Size Options
- Node Spacing
- Nudge Orthogonal Segments
- Nudge Orthogonal Touching Colinear Segments
- Nudge Shared Paths With Common Endpoint
- Omit Node Micro Layout
- Optimization Goal
- Order ID
- Orthogonal Compaction
- Outgoing Edge Angles
- Overlap Removal
- Padding
- Penalise Orthogonal Shared Paths
- Perform Unifying Nudging Preprocessing
- Polyomino Primary Sorting Criterion
- Polyomino Secondary Sorting Criterion
- Polyomino Traversal Strategy
- Port Alignment
- Port Alignment (East)
- Port Alignment (North)
- Port Alignment (South)
- Port Alignment (West)
- Port Anchor Offset
- Port Border Offset
- Port Constraints
- Port Direction Penalty
- Port Index
- Port Label Placement
- Port Labels Next to Port
- Port Side
- Port Sorting Strategy
- Port Spacing
- Position
- Position Choice Constraint
- Position Constraint
- Position Constraint
- Position ID
- Post Compaction Constraint Calculation
- Post Compaction Strategy
- Priority
- Priority (ELK Box)
- Priority (ELK Force)
- Priority (ELK Layered)
- Priority (ELK Mr. Tree)
- Progress Bar
- Radius
- Randomization Seed
- Repulsive Power
- Resolved Layout Algorithm
- Reverse Direction Penalty
- Root node for spanning tree construction
- Root selection for spanning tree
- Rotate
- Row Height Reevaluation
- Scale Factor
- Search Order
- Segment Penalty
- Self-Loop Distribution
- Self-Loop Ordering
- Semi-Interactive Crossing Minimization
- Separate Connected Components
- Shape Buffer Distance
- Shift Last Placed.
- Shortness Priority
- Shortness Priority (ELK Layered)
- Sloped Edge Zone Width
- Sloppy Spline Layer Spacing Factor
- Sorter
- Spacing Base Value
- Spline Routing Mode
- Straightness Priority
- Stress Epsilon
- Structure Extraction Strategy
- Target Angle
- Target Width
- Thoroughness
- Topdown Hierarchical Node Aspect Ratio
- Topdown Hierarchical Node Width
- Topdown Layout
- Topdown Node Type
- Topdown Scale Cap
- Topdown Scale Factor
- Topdown Size Approximator
- Translation Optimization
- Treat Port Labels as Group
- Tree Construction Strategy
- Tree Level
- Try box layout first
- Underlying Layout Algorithm
- Upper Bound On Width [MinWidth Layerer]
- Upper Layer Estimation Scaling Factor [MinWidth Layerer]
- Upper limit for iterations of overlap removal
- Valid Indices for Wrapping
- Validate Graph
- Validate Options
- Validification Strategy
- Vertical spacing between Label and Port
- Weighting of Nodes
- Whether to run a supplementary scanline overlap check.
- White Space Approximation Strategy
- Whitespace elimination strategy
- Width Approximation Strategy
- Zoom to Fit
- Layout Option Groups
- box
- compaction
- compaction
- compaction.postCompaction
- componentCompaction
- considerModelOrder
- crossingMinimization
- crossingMinimization.greedySwitch
- crossingMinimization.greedySwitchHierarchical
- cycleBreaking
- debug
- edge
- edgeLabels
- edgeLabels
- edgeRouting
- edgeRouting.polyline
- edgeRouting.splines
- edgeRouting.splines.sloppy
- font
- highDegreeNodes
- insideSelfLoops
- layering
- layering.coffmanGraham
- layering.minWidth
- layering.nodePromotion
- nodeArrangement
- nodeLabels
- nodePlacement
- nodePlacement.bk
- nodePlacement.linearSegments
- nodePlacement.networkSimplex
- nodePlacement.networkSimplex.nodeFlexibility
- nodeSize
- overlapRemoval
- packing
- packing.compaction
- partitioning
- polyomino
- port
- portAlignment
- portLabels
- priority
- processingOrder
- rotation
- spacing
- spacing
- structure
- topdown
- whiteSpaceElimination
- whitespaceElimination
- widthApproximation
- wrapping
- wrapping.cutting
- wrapping.cutting.msd
- wrapping.multiEdge
- wrapping.singleEdge
- wrapping.validify