Packageflare.vis.operator.label
Classpublic class RadialLabeler
InheritanceRadialLabeler Inheritance Labeler Inheritance Operator

Labeler that positions labels around a circle in polar coordinates.

If rotateLabels is set to , labels will be rotated such that they align radially. That is, the will be aligned along lines emanating out of the center of the circle. In this case, it is recommend that each label's textMode property be set to TextSprite.EMBED and that the appropriate fonts be embedded in your application. Otherwise, the text labels may be illegible due to rotation artifacts (for BITMAP labels) or will disappear alltogether (for DEVICE labels).



Public Properties
 PropertyDefined by
 Inheritedaccess : String
The name of the property in which to store created labels.
Labeler
  angleOffset : Number = 0
The number of radians to offset a label's angle.
RadialLabeler
 InheritedcacheText : Boolean
Boolean function indicating whether label text values should be cached or not.
Labeler
 Inheritedenabled : Boolean
Indicates if the operator is enabled or disabled.
Operator
 Inheritedfilter : Function
Boolean function indicating which items to process.
Labeler
 Inheritedgroup : String
The name of the data group to label.
Labeler
 InheritedhorizontalAnchor : int = 1
The horizontal alignment for labels.
Labeler
 InheritedlabelPolicy : String
The policy for how labels should be applied.
Labeler
 Inheritedlabels : Sprite
A sprite containing the labels, if a layer policy is used.
Labeler
 Inheritedparameters : Object
Sets parameter values for this operator.
Operator
  radiusOffset : Number = 0
The number of pixels to offset labels along the radius.
RadialLabeler
  rotateLabels : Boolean = false
If true, labels will be rotated to align along the radius.
RadialLabeler
 Inheritedsource : String
The source property that provides the label text.
Labeler
 InheritedtextFormat : TextFormat
The text format to apply to labels.
Labeler
 InheritedtextFunction : Function = null
Optional function for determining label text.
Labeler
 InheritedtextMode : int = 2
The text mode to use for the TextSprite labels.
Labeler
 InheritedverticalAnchor : int = 1
The vertical alignment for labels.
Labeler
 Inheritedvisualization : Visualization
The visualization processed by this operator.
Operator
 InheritedxOffset : Number = 0
The default x value for labels.
Labeler
 InheritedyOffset : Number = 0
The default y value for labels.
Labeler
Public Methods
 MethodDefined by
  
RadialLabeler(source:* = null, rotate:Boolean = false, format:TextFormat = null, filter:String = null, policy:*)
Creates a new RadialLabeler.
RadialLabeler
 Inherited
applyParameters(op:IOperator, params:Object):void
[static] Static method that applies parameter settings to an operator.
Operator
 Inherited
operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
Labeler
 Inherited
setup():void
Setup method invoked whenever this operator's visualization property is set.
Labeler
Protected Methods
 MethodDefined by
 Inherited
getLabel(d:DataSprite, create:Boolean = false, visible:Boolean = true):TextSprite
Retrives and optionally creates a label TextSprite for the given data sprite.
Labeler
 Inherited
Computes the label text for a given sprite.
Labeler
  
Performs label creation and layout for the given data sprite.
RadialLabeler
Public Constants
 ConstantDefined by
 InheritedCHILD : String = "child"
[static] Constant indicating that labels be added as children.
Labeler
 InheritedLAYER : String = "layer"
[static] Constant indicating that labels be placed in their own layer.
Labeler
Property detail
angleOffsetproperty
public var angleOffset:Number = 0

The number of radians to offset a label's angle.

radiusOffsetproperty 
public var radiusOffset:Number = 0

The number of pixels to offset labels along the radius.

rotateLabelsproperty 
public var rotateLabels:Boolean = false

If true, labels will be rotated to align along the radius.

Constructor detail
RadialLabeler()constructor
public function RadialLabeler(source:* = null, rotate:Boolean = false, format:TextFormat = null, filter:String = null, policy:*)

Creates a new RadialLabeler.

Parameters
source:* (default = null) — the property from which to retrieve the label text. If this value is a string or property instance, the label text will be pulled directly from the named property. If this value is a Function or Expression instance, the value will be used to set the textFunction property and the label text will be determined by evaluating that function.
 
rotate:Boolean (default = false) — flag indicating if labels should be rotated to align along the radius. If true, all text sprite labels should use embedded fonts to keep the rotated labels legibile. If false, labels will instead have their horizontal and vertical anchor settings adjusted according to their angle.
 
format:TextFormat (default = null) — optional text formatting information for labels
 
filter:String (default = null) — a Boolean-valued filter function determining which items will be given labels
 
policy:* — the label creation policy. One of LAYER (for adding a separate label layer) or CHILD (for adding labels as children of data objects)
Method detail
process()method
protected override function process(d:DataSprite):void

Performs label creation and layout for the given data sprite. Subclasses should override this method to perform custom labeling.

Parameters
d:DataSprite — the data sprite to process