Packageorg.axiis.layouts.scale
Classpublic class CategoricalScale
InheritanceCategoricalScale Inheritance AbstractScale Inheritance flash.events.EventDispatcher
Implements IScale

A scale that converts categorical (String) data into layout space. The categories are assumed to be sorted alphabetically.



Public Properties
 PropertyDefined By
 InheritedcomputedMaxValue : *
[read-only] The maximum value in the dataProvider.
AbstractScale
 InheritedcomputedMinValue : *
[read-only] The minimum value in the dataProvider.
AbstractScale
 InheriteddataField : String
The name of the property of the Objects in the dataProvider that should be used when computing min, max, sum, and average values.
AbstractScale
 InheriteddataProvider : Object
The DataSet, ArrayCollection, Array, XML, etc.
AbstractScale
 Inheritedinvalidated : Boolean
[read-only] Indicates that the scale should recalculate it's minimum and maximum values and layouts the next time either layoutToValue or valueToLayout is called.
AbstractScale
 InheritedmaxLayout : Number
The maximum layout position.
AbstractScale
 InheritedmaxValue : *
The maximum value allowed in this scale.
AbstractScale
 InheritedminLayout : Number
The minimum layout position.
AbstractScale
 InheritedminValue : *
The minimum value allowed in this scale.
AbstractScale
  sort : Sort
A sorting method used to determine the order of the objects in the dataProvider
CategoricalScale
Protected Properties
 PropertyDefined By
 Inheritedcollection : ArrayCollection
AbstractScale
 Inherited_computedMaxValue : *
[write-only]
AbstractScale
 Inherited_computedMinValue : *
[write-only]
AbstractScale
 InheriteduserMaxValue : *
The maximum value as specified by the user.
AbstractScale
 InheriteduserMinValue : *
The minimum value as specified by the user.
AbstractScale
Public Methods
 MethodDefined By
 Inherited
invalidate():void
Marks this IScale as needing its minValue and maxValue recomputed.
AbstractScale
  
layoutToIndex(layout:Number):Number
Converts a layout position to the index position of the corresponding categorical value.
CategoricalScale
  
layoutToValue(layout:*, invert:Boolean = false, clamp:Boolean = false):*
Converts a layout position to a value from the dataProvider.
CategoricalScale
  
validate():void
Initiates the computation of minValue and maxValue.
CategoricalScale
  
valueToLayout(value:*, invert:Boolean = false, clamp:Boolean = false):*
Converts a value to layout-space.
CategoricalScale
Events
 Event Summary Defined By
 InheritedDispatched when the data in the becomes invalid and the new min, max, sum, and average need to be computed.AbstractScale
Property Detail
sortproperty
public var sort:Sort

A sorting method used to determine the order of the objects in the dataProvider

Method Detail
layoutToIndex()method
public function layoutToIndex(layout:Number):Number

Converts a layout position to the index position of the corresponding categorical value.

Parameters

layout:Number — layout position to translate into a value.

Returns
Number
layoutToValue()method 
public function layoutToValue(layout:*, invert:Boolean = false, clamp:Boolean = false):*

Converts a layout position to a value from the dataProvider. The layout position is clamped between minLayout and maxLayout before the translation takes place.

Parameters

layout:* — layout position to translate into a value.
 
invert:Boolean (default = false)
 
clamp:Boolean (default = false)

Returns
*
validate()method 
override public function validate():void

Initiates the computation of minValue and maxValue.

valueToLayout()method 
public function valueToLayout(value:*, invert:Boolean = false, clamp:Boolean = false):*

Converts a value to layout-space. If the value is not represented within the dataProvider, NaN is returned.

Parameters

value:* — The value to be converted into layout space.
 
invert:Boolean (default = false) — Whether the minValue translates to minLayout (false) or to maxLayout (true).
 
clamp:Boolean (default = false)

Returns
*