Packageflare.vis.operator.encoder
Classpublic class SizeEncoder
InheritanceSizeEncoder Inheritance Encoder Inheritance Operator

Encodes a data field into size values, using a scale transform and a size palette to determines an item's scale. The target property of a SizeEncoder is assumed to be the DataSprite.size property.



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.
SizeEncoder
 Inheritedparameters : Object
Sets parameter values for this operator.
Operator
 Inheritedscale : ScaleBinding
A scale binding to the source data.
Encoder
  sizes : SizePalette
[read-only] The palette as a SizePalette instance.
SizeEncoder
 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
  
SizeEncoder(source:String = null, group:String, palette:SizePalette = null)
Creates a new SizeEncoder.
SizeEncoder
 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.
SizeEncoder
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
sizesproperty 
sizes:SizePalette  [read-only]

The palette as a SizePalette instance.

Implementation
    public function get sizes():SizePalette
Constructor detail
SizeEncoder()constructor
public function SizeEncoder(source:String = null, group:String, palette:SizePalette = null)

Creates a new SizeEncoder. By default, the scale type is set to a quantile scale grouped into 5 bins. Adjust the values of the scale property to change these defaults.

Parameters
source:String (default = null) — the source property
 
group:String — the data group to process
 
palette:SizePalette (default = null) — the size palette to use. If null, a default size palette will be used.
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