| Package | flare.vis.data |
| Class | public class ScaleBinding |
| Inheritance | ScaleBinding Scale |
| Property | Defined by | ||
|---|---|---|---|
| base : Number The number base to use for a quantitative scale (10 by default).
| ScaleBinding | ||
| bins : int The number of bins for quantile scales.
| ScaleBinding | ||
| data : Data
The data instance to bind to.
| ScaleBinding | ||
| flush : Boolean Flag indicating if the scale bounds should be flush with the data.
| ScaleBinding | ||
| group : String The data group to bind to.
| ScaleBinding | ||
| ignoreUpdates : Boolean = false If true, updates to the underlying data will be ignored, as will
any calls to
updateBinding. | ScaleBinding | ||
| labelFormat : String Formatting pattern for formatting labels for scale values.
| ScaleBinding | ||
| length : int [read-only] The number of distinct values in this scale, if ordinal.
| ScaleBinding | ||
| max : Object The maximum data value backing this scale.
| ScaleBinding | ||
| min : Object The minimum data value backing this scale.
| ScaleBinding | ||
| ordinals : Array An ordered array of values for defining an ordinal scale.
| ScaleBinding | ||
| power : Number A free parameter that indicates the exponent for a RootScale.
| ScaleBinding | ||
| preferredMax : Object The preferred maximum data value for the scale.
| ScaleBinding | ||
| preferredMin : Object The preferred minimum data value for the scale.
| ScaleBinding | ||
| property : String The data property to bind to.
| ScaleBinding | ||
| scaleType : String The type of scale to create.
| ScaleBinding | ||
| zeroBased : Boolean Flag indicating if a zero-based scale should be used.
| ScaleBinding | ||
| Property | Defined by | ||
|---|---|---|---|
![]() | _flush : Boolean = false Flag indicating if the scale bounds should be flush with the data.
| Scale | |
![]() | _format : String = "null" Formatting pattern for formatting labels for scale values.
| Scale | |
| scale : Scale
[read-only] The underlying scale created by this binding.
| ScaleBinding | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new ScaleBinding.
| ScaleBinding | ||
|
Returns a cloned copy of the scale.
| ScaleBinding | ||
|
index(value:Object):int
Returns the index of the input value in the ordinal array if the
scale is ordinal or categorical, otherwise returns -1.
| ScaleBinding | ||
|
interpolate(value:Object):Number
Returns an interpolation fraction indicating the position of the input
value within the scale range.
| ScaleBinding | ||
|
label(value:Object):String
Returns a string label representing a value in this scale.
| ScaleBinding | ||
|
lookup(f:Number):Object
Performs a reverse lookup, returning an object value corresponding
to a interpolation fraction along the scale range.
| ScaleBinding | ||
|
updateBinding():Boolean
Checks to see if the binding is current.
| ScaleBinding | ||
|
values(num:int = -1):Array
Returns a set of label values for this scale.
| ScaleBinding | ||
| base | property |
base:Number [read-write]The number base to use for a quantitative scale (10 by default).
Implementation public function get base():Number
public function set base(value:Number):void
| bins | property |
bins:int [read-write]The number of bins for quantile scales.
Implementation public function get bins():int
public function set bins(value:int):void
| data | property |
data:Data [read-write]The data instance to bind to.
Implementation public function get data():Data
public function set data(value:Data):void
| flush | property |
flush:Boolean [read-write]Flag indicating if the scale bounds should be flush with the data.
Implementation public function get flush():Boolean
public function set flush(value:Boolean):void
See also
| group | property |
group:String [read-write]The data group to bind to.
Implementation public function get group():String
public function set group(value:String):void
| ignoreUpdates | property |
public var ignoreUpdates:Boolean = false If true, updates to the underlying data will be ignored, as will
any calls to updateBinding. Set this flag if you want
to prevent the scale values from changing automatically.
| labelFormat | property |
labelFormat:String [read-write]Formatting pattern for formatting labels for scale values.
Implementation public function get labelFormat():String
public function set labelFormat(value:String):void
See also
| length | property |
length:int [read-only]The number of distinct values in this scale, if ordinal.
Implementation public function get length():int
| max | property |
max:Object [read-write]The maximum data value backing this scale. Note that the actual maximum scale value may be higher if the scale is not flush.
Implementation public function get max():Object
public function set max(value:Object):void
| min | property |
min:Object [read-write]The minimum data value backing this scale. Note that the actual minimum scale value may be lower if the scale is not flush.
Implementation public function get min():Object
public function set min(value:Object):void
| ordinals | property |
ordinals:Array [read-write]An ordered array of values for defining an ordinal scale.
Implementation public function get ordinals():Array
public function set ordinals(value:Array):void
| power | property |
power:Number [read-write]A free parameter that indicates the exponent for a RootScale.
Implementation public function get power():Number
public function set power(value:Number):void
| preferredMax | property |
preferredMax:Object [read-write]The preferred maximum data value for the scale. If null, the scale maximum will be determined from the data directly.
Implementation public function get preferredMax():Object
public function set preferredMax(value:Object):void
| preferredMin | property |
preferredMin:Object [read-write]The preferred minimum data value for the scale. If null, the scale minimum will be determined from the data directly.
Implementation public function get preferredMin():Object
public function set preferredMin(value:Object):void
| property | property |
property:String [read-write]The data property to bind to.
Implementation public function get property():String
public function set property(value:String):void
| scale | property |
scale:Scale [read-only]The underlying scale created by this binding.
Implementation protected function get scale():Scale
| scaleType | property |
scaleType:String [read-write]The type of scale to create.
Implementation public function get scaleType():String
public function set scaleType(value:String):void
| zeroBased | property |
zeroBased:Boolean [read-write]Flag indicating if a zero-based scale should be used. If set to true, and the scale type is numerical, the minimum or maximum scale value will automatically be adjusted to include the zero point as necessary.
Implementation public function get zeroBased():Boolean
public function set zeroBased(value:Boolean):void
| ScaleBinding | () | constructor |
public function ScaleBinding()Creates a new ScaleBinding.
| clone | () | method |
public override function clone():ScaleReturns a cloned copy of the scale.
ReturnsScale —
a cloned scale.
|
| index | () | method |
public function index(value:Object):intReturns the index of the input value in the ordinal array if the scale is ordinal or categorical, otherwise returns -1.
Parametersvalue:Object — the value to lookup
|
int — the index of the input value. If the value is not contained
in the ordinal array, this method returns -1.
|
| interpolate | () | method |
public override function interpolate(value:Object):NumberReturns an interpolation fraction indicating the position of the input value within the scale range.
Parametersvalue:Object — a data value for which to return an interpolation
fraction along the data scale
|
Number — the interpolation fraction of the value in the data scale
|
| label | () | method |
public override function label(value:Object):StringReturns a string label representing a value in this scale. The labelFormat property determines how the value will be formatted.
Parametersvalue:Object — the data value to get the string label for
|
String — a string label for the value
|
| lookup | () | method |
public override function lookup(f:Number):ObjectPerforms a reverse lookup, returning an object value corresponding to a interpolation fraction along the scale range.
Parametersf:Number — the interpolation fraction
|
Object — the scale value at the interpolation fraction. May return
null if no value corresponds to the input fraction.
|
| updateBinding | () | method |
public function updateBinding():BooleanChecks to see if the binding is current. If not, the internal stats and scale for this binding will be cleared and lazily recomputed.
ReturnsBoolean — true if the binding was updated, false otherwise
|
| values | () | method |
public override function values(num:int = -1):ArrayReturns a set of label values for this scale.
Parametersnum:int (default = -1) — a desired target number of labels. This parameter is
handled idiosyncratically by different scale sub-classes.
|
Array — an array of label values for the scale
|