Packageflare.scale
Classpublic class LinearScale
InheritanceLinearScale Inheritance QuantitativeScale Inheritance Scale

Scale that spaces values linearly along the scale range. This is the default scale for numeric types.



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.
LinearScale
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
  
LinearScale(min:Number = 0, max:Number = 0, base:Number = 10, flush:Boolean = false, labelFormat:String)
Creates a new LinearScale.
LinearScale
  
Returns a cloned copy of the scale.
LinearScale
 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.
LinearScale
 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.
LinearScale
 Inherited
updateScale():void
Updates the scale range after a change to the data range.
QuantitativeScale
Property detail
scaleTypeproperty
scaleType:String  [read-only]

A string indicating the type of scale this is.

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

Creates a new LinearScale.

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.