Packageflare.scale
Classpublic class QuantitativeScale
InheritanceQuantitativeScale Inheritance Scale
SubclassesLinearScale, LogScale, RootScale

Base class for representing quantitative numerical data scales.



Public Properties
 PropertyDefined by
  base : Number
The number base used by the scale.
QuantitativeScale
  dataMax : Number
The maximum data value.
QuantitativeScale
  dataMin : Number
The minimum data value.
QuantitativeScale
  flush : Boolean
[write-only]
QuantitativeScale
 InheritedlabelFormat : String
Formatting pattern for formatting labels for scale values.
Scale
  max : Object
The maximum data value backing this scale.
QuantitativeScale
  min : Object
The minimum data value backing this scale.
QuantitativeScale
  scaleMax : Number
[read-only] The maximum value of the scale range.
QuantitativeScale
  scaleMin : Number
[read-only] The minimum value of the scale range.
QuantitativeScale
 InheritedscaleType : String
A string indicating the type of scale this is.
Scale
Protected Properties
 PropertyDefined by
  _base : Number
The number base of the scale.
QuantitativeScale
  _dmax : Number
The maximum data value.
QuantitativeScale
  _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
  _smax : Number
The maximum value of the scale range.
QuantitativeScale
  _smin : Number
The minimum value of the scale range.
QuantitativeScale
Public Methods
 MethodDefined by
  
QuantitativeScale(min:Number = 0, max:Number = 0, base:Number = 10, flush:Boolean = false, labelFormat:String)
Creates a new QuantitativeScale.
QuantitativeScale
  
Returns a cloned copy of the scale.
QuantitativeScale
  
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.
QuantitativeScale
  
values(num:int = -1):Array
Returns a set of label values for this scale.
QuantitativeScale
Protected Methods
 MethodDefined by
  
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.
QuantitativeScale
  
updateScale():void
Updates the scale range after a change to the data range.
QuantitativeScale
Property detail
_baseproperty
protected var _base:Number

The number base of the scale.

baseproperty 
base:Number  [read-write]

The number base used by the scale. By default, base 10 numbers are assumed.

Implementation
    public function get base():Number
    public function set base(value:Number):void
dataMaxproperty 
dataMax:Number  [read-write]

The maximum data value. This property is the same as the maximum property, but properly typed.

Implementation
    public function get dataMax():Number
    public function set dataMax(value:Number):void
dataMinproperty 
dataMin:Number  [read-write]

The minimum data value. This property is the same as the minimum property, but properly typed.

Implementation
    public function get dataMin():Number
    public function set dataMin(value:Number):void
_dmaxproperty 
protected var _dmax:Number

The maximum data value.

_dminproperty 
protected var _dmin:Number

The minimum data value.

flushproperty 
flush:Boolean  [write-only]

Implementation
    public function set flush(value:Boolean):void
maxproperty 
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
minproperty 
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
scaleMaxproperty 
scaleMax:Number  [read-only]

The maximum value of the scale range.

Implementation
    public function get scaleMax():Number
scaleMinproperty 
scaleMin:Number  [read-only]

The minimum value of the scale range.

Implementation
    public function get scaleMin():Number
_smaxproperty 
protected var _smax:Number

The maximum value of the scale range.

_sminproperty 
protected var _smin:Number

The minimum value of the scale range.

Constructor detail
QuantitativeScale()constructor
public function QuantitativeScale(min:Number = 0, max:Number = 0, base:Number = 10, flush:Boolean = false, labelFormat:String)

Creates a new QuantitativeScale.

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
 
labelFormat:String — the formatting pattern for value labels
Method detail
clone()method
public override function clone():Scale

Returns a cloned copy of the scale.

Returns
Scale — a cloned scale.
getStep()method 
protected function getStep(min:Number, max:Number):Number

Returns the default step value between label values. The step is computed according to the current number base.

Parameters
min:Number — the minimum scale value
 
max:Number — the maximum scale value

Returns
Number — the default step value between label values
interp()method 
protected 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
interpolate()method 
public override function interpolate(value:Object):Number

Returns an interpolation fraction indicating the position of the input value within the scale range.

Parameters
value:Object — a data value for which to return an interpolation fraction along the data scale

Returns
Number — the interpolation fraction of the value in the data scale
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.
updateScale()method 
protected function updateScale():void

Updates the scale range after a change to the data range.

values()method 
public override function values(num:int = -1):Array

Returns a set of label values for this scale.

Parameters
num:int (default = -1) — a desired target number of labels. This parameter is handled idiosyncratically by different scale sub-classes.

Returns
Array — an array of label values for the scale