Packageflare.scale
Interfacepublic interface IScaleMap
ImplementorsAxis, LegendRange

Interface used by classes which support mapping between spatial (x,y) coordinates and values in a data scale. For example, both an axis or legend range should provide this functionality.



Public Properties
 PropertyDefined by
  x1 : Number
[read-only] Returns the x-coordinate corresponding to the lower end of the scale.
IScaleMap
  x2 : Number
[read-only] Returns the x-coordinate corresponding to the upper end of the scale.
IScaleMap
  y1 : Number
[read-only] Returns the y-coordinate corresponding to the lower end of the scale.
IScaleMap
  y2 : Number
[read-only] Returns the y-coordinate corresponding to the upper end of the scale.
IScaleMap
Public Methods
 MethodDefined by
  
value(x:Number, y:Number, stayInBounds:Boolean = true):Object
Returns the scale value corresponding to a given coordinate.
IScaleMap
  
X(val:Object):Number
Returns the x-coordinate corresponding to the given scale value
IScaleMap
  
Y(val:Object):Number
Returns the y-coordinate corresponding to the given scale value
IScaleMap
Property detail
x1property
x1:Number  [read-only]

Returns the x-coordinate corresponding to the lower end of the scale.

Implementation
    public function get x1():Number
x2property 
x2:Number  [read-only]

Returns the x-coordinate corresponding to the upper end of the scale.

Implementation
    public function get x2():Number
y1property 
y1:Number  [read-only]

Returns the y-coordinate corresponding to the lower end of the scale.

Implementation
    public function get y1():Number
y2property 
y2:Number  [read-only]

Returns the y-coordinate corresponding to the upper end of the scale.

Implementation
    public function get y2():Number
Method detail
value()method
public function value(x:Number, y:Number, stayInBounds:Boolean = true):Object

Returns the scale value corresponding to a given coordinate.

Parameters
x:Number — the x-coordinate
 
y:Number — the y-coordinate
 
stayInBounds:Boolean (default = true) — if true, x,y values outside the current layout bounds will be snapped to the bounds. If false, the value lookup will attempt to extrapolate beyond the scale bounds. This value is true be default.

Returns
Object — the scale value corresponding to the given coordinate.
X()method 
public function X(val:Object):Number

Returns the x-coordinate corresponding to the given scale value

Parameters
val:Object — the scale value to lookup

Returns
Number — the x-coordinate at which that scale value is placed
Y()method 
public function Y(val:Object):Number

Returns the y-coordinate corresponding to the given scale value

Parameters
val:Object — the scale value to lookup

Returns
Number — the y-coordinate at which that scale value is placed