| Package | flare.vis.operator.encoder |
| Class | public class ColorEncoder |
| Inheritance | ColorEncoder Encoder Operator |
| Property | Defined by | ||
|---|---|---|---|
| colors : ColorPalette
[read-only] The palette as a ColorPalette instance.
| ColorEncoder | ||
![]() | enabled : Boolean Indicates if the operator is enabled or disabled.
| Operator | |
![]() | filter : Function Boolean function indicating which items to process.
| Encoder | |
![]() | group : 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.
| ColorEncoder | ||
![]() | parameters : Object
Sets parameter values for this operator.
| Operator | |
![]() | scale : ScaleBinding
A scale binding to the source data.
| Encoder | |
![]() | source : String The source property.
| Encoder | |
![]() | target : String The target property.
| Encoder | |
![]() | visualization : Visualization
The visualization processed by this operator.
| Operator | |
| Method | Defined by | ||
|---|---|---|---|
|
ColorEncoder(source:String = null, group:String, target:String = "lineColor", scaleType:String = null, palette:ColorPalette = null)
Creates a new ColorEncoder.
| ColorEncoder | ||
![]() |
applyParameters(op:IOperator, params:Object):void
[static]
Static method that applies parameter settings to an operator.
| Operator | |
|
operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
| ColorEncoder | ||
|
setup():void
Setup method invoked whenever this operator's visualization
property is set.
| ColorEncoder | ||
| Method | Defined by | ||
|---|---|---|---|
|
encode(val:Object):*
Computes an encoding for the input value.
| ColorEncoder | ||
|
Returns a default color palette based on the input scale.
| ColorEncoder | ||
| colors | property |
colors:ColorPalette [read-only]The palette as a ColorPalette instance.
Implementation public function get colors():ColorPalette
| palette | property |
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
| ColorEncoder | () | constructor |
public function ColorEncoder(source:String = null, group:String, target:String = "lineColor", scaleType:String = null, palette:ColorPalette = null)Creates a new ColorEncoder.
Parameterssource:String (default = null) — the source property
|
|
group:String — the data group to encode ("nodes" by default)
|
|
target:String (default = "lineColor") — the target property ("lineColor" by default)
|
|
scaleType:String (default = null) — the type of scale to use. If null, the scale type
will be determined by the underlying ScaleBinding
instance, based on the type of data.
|
|
palette:ColorPalette (default = null) — the color palette to use. If null, a default color
palette will be determined based on the scale type.
|
| encode | () | method |
protected override function encode(val:Object):*Computes an encoding for the input value.
Parametersval:Object — a data value to encode
|
* — the encoded visual value
|
| getDefaultPalette | () | method |
protected function getDefaultPalette():ColorPaletteReturns a default color palette based on the input scale.
ReturnsColorPalette —
a default color palette for the input scale
|
| operate | () | method |
public override function operate(t:Transitioner = null):voidPerforms an operation over the contents of a visualization.
Parameterst:Transitioner (default = null) — a Transitioner instance for collecting value updates.
|
| setup | () | method |
public override function setup():voidSetup method invoked whenever this operator's visualization property is set.