| Package | flare.scale |
| Class | public class QuantitativeScale |
| Inheritance | QuantitativeScale Scale |
| Subclasses | LinearScale, LogScale, RootScale |
| Property | Defined 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 | ||
![]() | labelFormat : 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 | ||
![]() | scaleType : String A string indicating the type of scale this is.
| Scale | |
| Property | Defined by | ||
|---|---|---|---|
| _base : Number The number base of the scale.
| QuantitativeScale | ||
| _dmax : Number The maximum data value.
| QuantitativeScale | ||
| _dmin : Number The minimum data value.
| QuantitativeScale | ||
![]() | _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 | |
| _smax : Number The maximum value of the scale range.
| QuantitativeScale | ||
| _smin : Number The minimum value of the scale range.
| QuantitativeScale | ||
| Method | Defined 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 | ||
![]() |
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 | ||
| Method | Defined 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 | ||
| _base | property |
protected var _base:NumberThe number base of the scale.
| base | property |
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
| dataMax | property |
dataMax:Number [read-write] The maximum data value. This property is the same as the
maximum property, but properly typed.
public function get dataMax():Number
public function set dataMax(value:Number):void
| dataMin | property |
dataMin:Number [read-write] The minimum data value. This property is the same as the
minimum property, but properly typed.
public function get dataMin():Number
public function set dataMin(value:Number):void
| _dmax | property |
protected var _dmax:NumberThe maximum data value.
| _dmin | property |
protected var _dmin:NumberThe minimum data value.
| flush | property |
flush:Boolean [write-only]Implementation
public function set flush(value:Boolean):void
| 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
| scaleMax | property |
scaleMax:Number [read-only]The maximum value of the scale range.
Implementation public function get scaleMax():Number
| scaleMin | property |
scaleMin:Number [read-only]The minimum value of the scale range.
Implementation public function get scaleMin():Number
| _smax | property |
protected var _smax:NumberThe maximum value of the scale range.
| _smin | property |
protected var _smin:NumberThe minimum value of the scale range.
| QuantitativeScale | () | constructor |
public function QuantitativeScale(min:Number = 0, max:Number = 0, base:Number = 10, flush:Boolean = false, labelFormat:String)Creates a new QuantitativeScale.
Parametersmin: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
|
| clone | () | method |
public override function clone():ScaleReturns a cloned copy of the scale.
ReturnsScale —
a cloned scale.
|
| getStep | () | method |
protected function getStep(min:Number, max:Number):NumberReturns the default step value between label values. The step is computed according to the current number base.
Parametersmin:Number — the minimum scale value
|
|
max:Number — the maximum scale value
|
Number — the default step value between label values
|
| interp | () | method |
protected function interp(val:Number):NumberReturns the interpolation fraction for the given input number.
Parametersval:Number — the input number
|
Number — the interpolation fraction for the input value
|
| 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
|
| 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.
|
| updateScale | () | method |
protected function updateScale():voidUpdates the scale range after a change to the data range.
| 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
|