| Package | flare.vis.operator.layout |
| Class | public class CirclePackingLayout |
| Inheritance | CirclePackingLayout Layout Operator |
Circle sizes are determined by a node's size property.
It is assumed that the sizes are set before this operator is run,
for example, by placing a SizeEncoder prior to this layout
in an operator list.
If the treeLayout property is false, all
nodes will be treated the same and the result will be a "bubble" chart.
If the treeLayout property is true, circles will
be nested inside each other according to the tree structure of the data.
The results of this layout can vary dramatically based on the sort
order of the nodes. For example, sorting the nodes by the
size property (in either ascending or descending order)
can result in much cleaner layouts. Use the sort property
of this class to set a preferred sorting routine. By default, this
operator will not perform any sorting.
NOTE: This operator will set a node's renderer and
shape properties, overriding any previous values.
The algorithm used to perform the circle packing is adapted from W. Wang, H. Wang, G. Dai, and H. Wang's Visualization of large hierarchical data by circle packing, ACM CHI 2006.
| Property | Defined by | ||
|---|---|---|---|
![]() | enabled : Boolean Indicates if the operator is enabled or disabled.
| Operator | |
| fitInBounds : Boolean = true Indicates if the view should be scaled to fit within the
display bounds.
| CirclePackingLayout | ||
| group : String = "nodes" The data group to process.
| CirclePackingLayout | ||
![]() | layoutAnchor : Point The layout anchor, used by some layout instances to place an
initial item or determine a focal point.
| Layout | |
![]() | layoutBounds : Rectangle The layout bounds for the layout.
| Layout | |
![]() | layoutRoot : DataSprite
The layout root, the root node for tree layouts.
| Layout | |
![]() | layoutType : String = "null" The type of layout and axes.
| Layout | |
![]() | parameters : Object
Sets parameter values for this operator.
| Operator | |
| sort : Sort
A sort criteria for ordering nodes in this layout.
| CirclePackingLayout | ||
| spacing : Number = 4 The amount of spacing between neighboring circles.
| CirclePackingLayout | ||
| treeLayout : Boolean = false Indicates if a tree layout (circles nested within circles) should
be computed.
| CirclePackingLayout | ||
![]() | visualization : Visualization
The visualization processed by this operator.
| Operator | |
| Method | Defined by | ||
|---|---|---|---|
|
CirclePackingLayout(spacing:Number = 4, treeLayout:Boolean = false, sort:* = null)
Creates a new CirclePackingLayout.
| CirclePackingLayout | ||
![]() |
applyParameters(op:IOperator, params:Object):void
[static]
Static method that applies parameter settings to an operator.
| Operator | |
![]() |
clearEdgePoints():void
Strips all EdgeSprites in a visualization of any control points.
| Layout | |
![]() |
Hides the axes.
| Layout | |
![]() |
operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
| Layout | |
![]() |
setup():void
Setup method invoked whenever this operator's visualization
property is set.
| Operator | |
![]() |
Reveals the axes.
| Layout | |
![]() |
[static]
Updates all edges to be straight lines.
| Layout | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
autoAnchor():void
Automatically-generate an anchor point.
| Layout | |
|
layout():void
Calculates the spatial layout of visualized items.
| CirclePackingLayout | ||
![]() |
minAngle(a1:Number, a2:Number):Number
Returns an angle value that minimizes the angular distance
between a reference angle and a target angle.
| Layout | |
| fitInBounds | property |
public var fitInBounds:Boolean = trueIndicates if the view should be scaled to fit within the display bounds. The default is true.
| group | property |
public var group:String = "nodes"The data group to process. This setting will be ignored if tree mode is set to true.
| sort | property |
sort:Sort [read-write]A sort criteria for ordering nodes in this layout. Ordered nodes are placed in a spiral starting at the center. The default is null, meaning no sorting is performed.
Implementation public function get sort():Sort
public function set sort(value:Sort):void
| spacing | property |
public var spacing:Number = 4The amount of spacing between neighboring circles. The default value is 4 pixels.
| treeLayout | property |
public var treeLayout:Boolean = falseIndicates if a tree layout (circles nested within circles) should be computed. The default is false. Any data group settings will be ignored if this operator uses a tree layout.
| CirclePackingLayout | () | constructor |
public function CirclePackingLayout(spacing:Number = 4, treeLayout:Boolean = false, sort:* = null)Creates a new CirclePackingLayout.
Parametersspacing:Number (default = 4) — the minimum spacing between neighboring circles
|
|
treeLayout:Boolean (default = false) — if true, a hierarchical circles-within-circles
layout will be peformed; if false (the default) all nodes will be
considered equally
|
|
sort:* (default = null) — a sort criteria for ordering nodes in the layout.
Ordered nodes are placed in a spiral starting at the center.
|
| layout | () | method |
protected override function layout():voidCalculates the spatial layout of visualized items. Layout operators override this method with their layout implementations.