Packageardisia.components.colorizer
Classpublic class GradientColorizer
InheritanceGradientColorizer Inheritance flash.events.EventDispatcher
Implements IColorizer

Colorizer useful for assigning colors to elements in charting classes.

View the technical documentation on the Ardisia Labs website for more information.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
  dataProvider : Vector.<GradientColorizerData>
Populate with a vector of GradientColorizerData objects.
GradientColorizer
  rangeMaximum : Number = 1
Defines the maximum value of the range.
GradientColorizer
  rangeMinimum : Number = 0
Defines the minimum value of the range.
GradientColorizer
Public Methods
 MethodDefined By
  
getColor(value:Number):uint
Returns a color based on the value parameter.
GradientColorizer
Protected Methods
 MethodDefined By
  
Sorts the passed GradientColorizerData objects from lowest ratio to the highest ratio.
GradientColorizer
Events
 Event Summary Defined By
  Dispatched when the "dataProvider" property changes.GradientColorizer
Property Detail
dataProviderproperty
dataProvider:Vector.<GradientColorizerData>

Populate with a vector of GradientColorizerData objects.

The default value is null.


Implementation
    public function get dataProvider():Vector.<GradientColorizerData>
    public function set dataProvider(value:Vector.<GradientColorizerData>):void
rangeMaximumproperty 
public var rangeMaximum:Number = 1

Defines the maximum value of the range.

The default value is 1.

rangeMinimumproperty 
public var rangeMinimum:Number = 0

Defines the minimum value of the range.

The default value is 0.

Method Detail
getColor()method
public function getColor(value:Number):uint

Returns a color based on the value parameter.

Parameters

value:Number — the number used to lookup the color from the dataProvider

Returns
uint — a uint color value or null if no color returned
sortFunction()method 
protected function sortFunction(x:GradientColorizerData, y:GradientColorizerData):Number

Sorts the passed GradientColorizerData objects from lowest ratio to the highest ratio.

Parameters

x:GradientColorizerData — the first GradientColorizerData object to sort
 
y:GradientColorizerData — the second GradientColorizerData object to sort

Returns
Number — -1 if x is first, 1 if y is first
Event Detail
change Event
Event Object Type: ardisia.components.colorizer.events.ColorizerEvent
ColorizerEvent.type property = ardisia.components.colorizer.events.ColorizerEvent

Dispatched when the "dataProvider" property changes.