Packageflare.vis.operator.label
Classpublic class StackedAreaLabeler
InheritanceStackedAreaLabeler Inheritance Labeler Inheritance Operator

Labeler for a stacked area chart. Use in conjunction with the StackedAreaLayout operator. Adds labels to stacks whose maximum height in pixels exceeds the minimum threshold value.

NOTE: This has only been tested for use with horizontally oriented stacks. In the future, this will be extended to work with vertically oriented stacks as well.



Public Properties
 PropertyDefined by
 Inheritedaccess : String
The name of the property in which to store created labels.
Labeler
  baseSize : int = 6
The base (minimum) size for labels.
StackedAreaLabeler
 InheritedcacheText : Boolean
Boolean function indicating whether label text values should be cached or not.
Labeler
  columnIndex : int = 2
Indicates the first column considered for label placement.
StackedAreaLabeler
 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
 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
  threshold : Number = 12
The minimum width for a stack to receive a label (default 12).
StackedAreaLabeler
 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
  
StackedAreaLabeler(source:* = null, group:String)
Creates a new StackedAreaLabeler.
StackedAreaLabeler
 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.
StackedAreaLabeler
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
baseSizeproperty
public var baseSize:int = 6

The base (minimum) size for labels.

columnIndexproperty 
public var columnIndex:int = 2

Indicates the first column considered for label placement. This prevents columns on the edges of the display from being labeled, as the labels might then bleed outside the display.

thresholdproperty 
public var threshold:Number = 12

The minimum width for a stack to receive a label (default 12).

Constructor detail
StackedAreaLabeler()constructor
public function StackedAreaLabeler(source:* = null, group:String)

Creates a new StackedAreaLabeler.

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.
 
group:String
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