# 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 work.

#### 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 algorithm work: The algorithms starts placing the root node and then continues with placing each node of each subtree. Each subtree of the 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 leafs. The node which shall be placed gets space according to the number of leafs 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 leafs that 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 diagonals of a radius or respectively 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. Therfore the position reflects the position of the nodes in the parent node. This options may be adapted to other purposes.

## Supported Options

Option | Default Value
--- | ---
Annulus Wedge Criteria | `AnnulusWedgeCriteria.NODE_SIZE`
Compaction | `CompactionStrategy.NONE`
Compaction Step Size | `1`
Node Spacing | `20`
Order ID | `0`
Position | `<not defined>`
Radius | `0.0`
Sorter | `SortingStrategy.NONE`
Translation Optimization | `RadialTranslationStrategy.NONE`

- Algorithms
- Box Layout
- Circo
- Dot
- Draw2D Layout
- ELK DisCo
- ELK Force
- ELK Layered
- ELK Mr. Tree
- ELK Radial
- ELK SPOrE Compaction
- ELK SPOrE Overlap Removal
- ELK Stress
- FDP
- Fixed Layout
- Neato
- Randomizer
- Twopi
- Layout Options
- Activate Inside Self Loops
- Adapt Port Positions
- Add Unnecessary Bendpoints
- Additional Port Space
- Additional Wrapped Edges Spacing
- Alignment
- Animate
- Animation Time Factor
- Annulus Wedge Criteria
- Aspect Ratio
- BK Edge Straightening
- BK Fixed Alignment
- Bend Points
- Box Layout Mode
- Comment Box
- Compaction
- Compaction Step Size
- Compaction Strategy
- Components Spacing
- Concentrate Edges
- Connected Components Compaction
- Connected Components Compaction Strategy
- Connected Components Layout Algorithm
- Content Alignment
- Correction Factor for Wrapping
- Cost Function for Spanning Tree
- Crossing Minimization Strategy
- Cutting Strategy
- Cycle Breaking Strategy
- DCGraph
- Debug Mode
- Desired Edge Length
- 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 Label Placement
- Edge Label Side Selection
- Edge Label Spacing
- Edge Node Between Layers Spacing
- Edge Node Spacing
- Edge Routing
- Edge Spacing
- Edge Thickness
- Edge Type
- Epsilon
- Expand Nodes
- FR Temperature
- Favor Straight Edges Over Balancing
- Feedback Edges
- Fill Polyominoes
- Fixed Position
- Font Name
- Font Size
- Force Model
- Graph Wrapping Strategy
- Greedy Switch Activation Threshold
- Greedy Switch Crossing Minimization
- Hierarchical Sweepiness
- Hierarchy Handling
- High Degree Node Maximum Tree Height
- High Degree Node Threshold
- High Degree Node Treatment
- Hypernode
- Improve Cuts
- Improve Wrapped Edges
- Individual Spacing Override
- Inline Edge Labels
- Inside Self Loop
- Interactive
- Interactive Reference Point
- Iteration Limit
- Iterations
- Iterations Factor
- Junction Points
- Label Angle
- Label Distance
- Label Manager
- Label Manager
- Label Node Spacing
- Label Port Spacing
- Label Spacing
- Layer Bound
- Layer Constraint
- Layer Spacing Factor
- Layout Algorithm
- Layout Ancestors
- Layout Dimension
- Layout Partition
- Layout Partitioning
- Linear Segments Deflection Dampening
- List of Polyominoes
- MSD Freedom
- Manually Specified Cuts
- Margins
- Max Node Promotion Iterations
- Max. Iterations
- Maximal Animation Time
- Merge Edges
- Merge Hierarchy-Crossing Edges
- Minimal Animation Time
- No Layout
- 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 Size Constraints
- Node Size Minimum
- Node Size Options
- Node Spacing
- North or South Port
- Order ID
- Orthogonal Compaction
- Overlap Removal
- Padding
- 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 Index
- Port Label Placement
- Port Labels Next to Port
- Port Side
- Port Sorting Strategy
- Port Spacing
- Position
- Post Compaction Constraint Calculation
- Post Compaction Strategy
- Priority
- Progress Bar
- Radius
- Randomization Seed
- Repulsive Power
- Resolved Layout Algorithm
- Root node for spanning tree construction
- Root selection for spanning tree
- Scale Factor
- Search Order
- Semi-Interactive Crossing Minimization
- Separate Connected Components
- Shortness Priority
- Sloppy Spline Layer Spacing Factor
- Sorter
- Spline Routing Mode
- Spline Self-Loop Placement
- Straightness Priority
- Stress Epsilon
- Structure Extraction Strategy
- Thoroughness
- Translation Optimization
- Tree Construction Strategy
- 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
- Weighting of Nodes
- Whether to run a supplementary scanline overlap check.
- Wide Nodes on Multiple Layers
- Zoom to Fit
- Layout Option Groups
- compaction
- compaction
- compaction.postCompaction
- componentCompaction
- crossingMinimization
- crossingMinimization.greedySwitch
- cycleBreaking
- debug
- edge
- edgeLabels
- edgeLabels
- edgeRouting
- edgeRouting.splines
- edgeRouting.splines.sloppy
- font
- highDegreeNodes
- insideSelfLoops
- layering
- layering.coffmanGraham
- layering.minWidth
- layering.nodePromotion
- nodeLabels
- nodePlacement
- nodePlacement.bk
- nodePlacement.linearSegments
- nodePlacement.networkSimplex
- nodeSize
- overlapRemoval
- partitioning
- polyomino
- port
- portAlignment
- portLabels
- priority
- processingOrder
- spacing
- spacing
- structure
- wrapping
- wrapping.cutting
- wrapping.cutting.msd
- wrapping.multiEdge
- wrapping.singleEdge
- wrapping.validify