Packageflare.vis.operator.encoder
Classpublic class ShapeEncoder
InheritanceShapeEncoder Inheritance Encoder Inheritance Operator

Encodes a data field into shape values, using an ordinal scale. Shape values are integer indices that map into a shape palette, which provides drawing routines for shapes. See the flare.palette.ShapePalette and flare.data.render.ShapeRenderer classes for more.



Public Properties
 PropertyDefined by
 Inheritedenabled : Boolean
Indicates if the operator is enabled or disabled.
Operator
 Inheritedfilter : Function
Boolean function indicating which items to process.
Encoder
 Inheritedgroup : String
The name of the data group for which to compute the encoding.
Encoder
  palette : Palette
The palette used to map scale values to visual values.
ShapeEncoder
 Inheritedparameters : Object
Sets parameter values for this operator.
Operator
 Inheritedscale : ScaleBinding
A scale binding to the source data.
Encoder
  shapes : ShapePalette
The palette as a ShapePalette instance.
ShapeEncoder
 Inheritedsource : String
The source property.
Encoder
 Inheritedtarget : String
The target property.
Encoder
 Inheritedvisualization : Visualization
The visualization processed by this operator.
Operator
Protected Properties
 PropertyDefined by
 Inherited_binding : ScaleBinding
A scale binding to the source data.
Encoder
 Inherited_filter : Function
Boolean function indicating which items to process.
Encoder
 Inherited_t : Transitioner
A transitioner for collecting value updates.
Encoder
 Inherited_target : String
The target property.
Encoder
Public Methods
 MethodDefined by
  
ShapeEncoder(field:String = null, group:String, palette:ShapePalette = null)
Creates a new ShapeEncoder.
ShapeEncoder
 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.
Encoder
 Inherited
setup():void
Setup method invoked whenever this operator's visualization property is set.
Encoder
Protected Methods
 MethodDefined by
  
encode(val:Object):*
Computes an encoding for the input value.
ShapeEncoder
Property detail
paletteproperty
palette:Palette  [read-write]

The palette used to map scale values to visual values.

Implementation
    public function get palette():Palette
    public function set palette(value:Palette):void
shapesproperty 
shapes:ShapePalette  [read-write]

The palette as a ShapePalette instance.

Implementation
    public function get shapes():ShapePalette
    public function set shapes(value:ShapePalette):void
Constructor detail
ShapeEncoder()constructor
public function ShapeEncoder(field:String = null, group:String, palette:ShapePalette = null)

Creates a new ShapeEncoder.

Parameters
field:String (default = null) — the source property
 
group:String — the data group to process
 
palette:ShapePalette (default = null) — the shape palette for assigning shapes
Method detail
encode()method
protected override function encode(val:Object):*

Computes an encoding for the input value.

Parameters
val:Object — a data value to encode

Returns
* — the encoded visual value