| Package | flare.scale |
| Class | public class LinearScale |
| Inheritance | LinearScale QuantitativeScale Scale |
| 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 | 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 The maximum value of the scale range.
| QuantitativeScale | |
![]() | scaleMin : Number The minimum value of the scale range.
| QuantitativeScale | |
| scaleType : String [read-only] A string indicating the type of scale this is.
| LinearScale | ||
| Method | Defined 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 | ||
![]() |
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.
| LinearScale | ||
![]() |
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.
| LinearScale | ||
![]() |
updateScale():void
Updates the scale range after a change to the data range.
| QuantitativeScale | |
| scaleType | property |
scaleType:String [read-only]A string indicating the type of scale this is.
Implementation public function get scaleType():String
| LinearScale | () | constructor |
public function LinearScale(min:Number = 0, max:Number = 0, base:Number = 10, flush:Boolean = false, labelFormat:String)Creates a new LinearScale.
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.
|
| interp | () | method |
protected override 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
|
| 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.
|