Packageflare.scale
Classpublic class RootScale
InheritanceRootScale Inheritance QuantitativeScale Inheritance Scale

Scale that performs a root transformation of the data. This could be a square root or any arbitrary power.



Public Properties
 PropertyDefined by
 Inheritedbase : Number
The number base used by the scale.
QuantitativeScale
 InheriteddataMax : Number
The maximum data value.
QuantitativeScale
 InheriteddataMin : Number
The minimum data value.
QuantitativeScale
 Inheritedflush : Boolean
QuantitativeScale
 InheritedlabelFormat : String
Formatting pattern for formatting labels for scale values.
Scale
 Inheritedmax : Object
The maximum data value backing this scale.
QuantitativeScale
 Inheritedmin : Object
The minimum data value backing this scale.
QuantitativeScale
  power : Number
The power of the root transform.
RootScale
 InheritedscaleMax : Number
The maximum value of the scale range.
QuantitativeScale
 InheritedscaleMin : Number
The minimum value of the scale range.
QuantitativeScale
  scaleType : String
[read-only] A string indicating the type of scale this is.
RootScale
Protected Properties
 PropertyDefined by
 Inherited_base : Number
The number base of the scale.
QuantitativeScale
 Inherited_dmax : Number
The maximum data value.
QuantitativeScale
 Inherited_dmin : Number
The minimum data value.
QuantitativeScale
 Inherited_flush : Boolean = false
Flag indicating if the scale bounds should be flush with the data.
Scale
 Inherited_format : String = "null"
Formatting pattern for formatting labels for scale values.
Scale
 Inherited_smax : Number
The maximum value of the scale range.
QuantitativeScale
 Inherited_smin : Number
The minimum value of the scale range.
QuantitativeScale
Public Methods
 MethodDefined by
  
RootScale(min:Number = 0, max:Number = 0, base:Number = 10, flush:Boolean = false, pow:Number = 2, labelFormat:String)
Creates a new RootScale.
RootScale
  
Returns a cloned copy of the scale.
RootScale
 Inherited
interpolate(value:Object):Number
Returns an interpolation fraction indicating the position of the input value within the scale range.
QuantitativeScale
 Inherited
label(value:Object):String
Returns a string label representing a value in this scale.
Scale
  
lookup(f:Number):Object
Performs a reverse lookup, returning an object value corresponding to a interpolation fraction along the scale range.
RootScale
 Inherited
values(num:int = -1):Array
Returns a set of label values for this scale.
QuantitativeScale
Protected Methods
 MethodDefined by
 Inherited
getStep(min:Number, max:Number):Number
Returns the default step value between label values.
QuantitativeScale
  
interp(val:Number):Number
Returns the interpolation fraction for the given input number.
RootScale
 Inherited
updateScale():void
Updates the scale range after a change to the data range.
QuantitativeScale
Property detail
powerproperty
power:Number  [read-write]

The power of the root transform. A value of 2 indicates a square root, 3 a cubic root, etc.

Implementation
    public function get power():Number
    public function set power(value:Number):void
scaleTypeproperty 
scaleType:String  [read-only]

A string indicating the type of scale this is.

Implementation
    public function get scaleType():String
Constructor detail
RootScale()constructor
public function RootScale(min:Number = 0, max:Number = 0, base:Number = 10, flush:Boolean = false, pow:Number = 2, labelFormat:String)

Creates a new RootScale.

Parameters
min:Number (default = 0) — the minimum data value
 
max:Number (default = 0) — the maximum data value
 
base:Number (default = 10) — the number base to use
 
flush:Boolean (default = false) — the flush flag for scale padding
 
pow:Number (default = 2) — the formatting pattern for value labels
 
labelFormat:String
Method detail
clone()method
public override function clone():Scale

Returns a cloned copy of the scale.

Returns
Scale — a cloned scale.
interp()method 
protected override function interp(val:Number):Number

Returns the interpolation fraction for the given input number.

Parameters
val:Number — the input number

Returns
Number — the interpolation fraction for the input value
lookup()method 
public override function lookup(f:Number):Object

Performs a reverse lookup, returning an object value corresponding to a interpolation fraction along the scale range.

Parameters
f:Number — the interpolation fraction

Returns
Object — the scale value at the interpolation fraction. May return null if no value corresponds to the input fraction.