Packageflare.scale
Classpublic class LogScale
InheritanceLogScale Inheritance QuantitativeScale Inheritance Scale

Scale that performs a log transformation of the data. The base of the logarithm is determined by the base property.



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
 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.
LogScale
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
  
LogScale(min:Number = 0, max:Number = 0, base:Number = 10, flush:Boolean = false, labelFormat:String)
Creates a new LogScale.
LogScale
  
Returns a cloned copy of the scale.
LogScale
 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.
LogScale
  
values(num:int = -1):Array
Returns a set of label values for this scale.
LogScale
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.
LogScale
  
updateScale():void
Updates the scale range after a change to the data range.
LogScale
Property detail
scaleTypeproperty
scaleType:String  [read-only]

A string indicating the type of scale this is.

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

Creates a new LogScale.

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.
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.
updateScale()method 
protected override 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