Packagecom.flexicious.components.visualization
Classpublic class Gauge
InheritanceGauge Inheritance com.flexicious.lic.GaugeBase
Implements ISpinnerOwner, mx.controls.listClasses.IListItemRenderer
Subclasses AxisBase, HorizontalLinearGauge, HorizontalSemiCircleGauge, TrafficLight, VerticalLinearGauge, VerticalSemiCircleGauge

The base control for all Gauges. The following gauge controls inherit from this class: All the gauges basically draw the UI in the associated skin class. Any skin associated with this control or any of its derivatives must implement the com.flexicious.skins.visualization.IGaugeSkin interface. This class has very little "real" code. Most of the code in this class is holders for the properties that are required by the various skins. All the properties associated the the ticks start with the 'tick' prefix. Not all properties are used by all the skins, so setting a property that is not used by the skin will have no effect on the UI. Please refer to the skin for each of the controls that inherit from this class. The ranges property is an array of the com.flexicious.components.visualization.gaugesupport.RangeInfo object which define the start, end and color for each range. You should ensure that the range values make sense, and fall within the tickStartValue and tickEndValues, as well as do not overlap within themselves.

Default MXML PropertymxmlContentFactory



Public Properties
 PropertyDefined By
  activeRangeInfo : RangeInfo
[read-only] Gets the range info object within which the current gauge value falls.
Gauge
  animate : Boolean
Whether or not to animate the gauges.
Gauge
  animationDuration : Number
The number of milliseconds to run the animation for.
Gauge
  circleSize : Number
[read-only]
Gauge
  convertZeroesToAlpha : Boolean
Flag to convert thousands, millions and billions into Alpha representations.
Gauge
  currentTip : IToolTip
The current instance of the data tip for this control
Gauge
  data : Object
Gauge
  dataTipFunction : Function
A function that gets called to retrieve the text to be displayed in the tooltip behavior.
Gauge
  dataTipRenderer : IFactory
Renderer for the data tip.
Gauge
  dialColor : Number
Gauge
  dialColorGradientBrightness : Number
Gauge
  dialColorGradientDarkness : Number
Gauge
  dialLinearGradient : Boolean
Gauge
  dialRimColor : Number
Gauge
  dialTitle : String
The text for the title of the dial.
Gauge
  dialTitleStyleName : String
The style name to apply to the dial title Default: dialText - textAlign:center;color:#3c3c3c;
Gauge
  diameter : Number
By default, returns width.
Gauge
  elementsToBlur : Array
[read-only]
Gauge
  elementToCenter : IUIComponent
[read-only]
Gauge
  endAngle : Number
The angle at which to end the ticks and the ranges.
Gauge
  gaugeValue : Number
The value to show for the dial
Gauge
  gaugeValueStyleName : String
The style name to apply to the dial value Default: gaugeValueText - textAlign:center;color:#3c3c3c;
Gauge
  labelRotation : Number
The degrees to rotate the label by
Gauge
  labelXOffset : Number
To accomodate various positioning scenarios, the default calculation of the labels can be changed.
Gauge
  labelYOffset : Number
To accomodate various positioning scenarios, the default calculation of the labels can be changed.
Gauge
  needleBaseColor : Number
Gauge
  needleColor : Number
Gauge
  needleRotation : Number
[read-only] In normal state, needle is in the 9 o clock position.
Gauge
  needleThickness : Number
Gauge
  rangeGap : Number
Distance between the edge of the dial, and the edge of the range arc as well as the needle tip.
Gauge
  ranges : Array
An array of RangeInfo Objects that define the ranges of the gauge.
Gauge
  rangeThickness : Number
The thickness of the range lines.
Gauge
  showGaugeValue : Boolean
Flag whether or not to show the gauge value.
Gauge
  showSpinnerOnCreationComplete : Boolean
Gauge
  spinner : ISpinner
Gauge
  spinnerBehavior : SpinnerBehavior
Gauge
  spinnerFactory : IFactory
Factory responsible for instantiating a new spinner.
Gauge
  spinnerLabel : String
The label of the spinner control, you can use styles to control the appearance.
Gauge
  spinnerParent : Object
[read-only]
Gauge
  startAngle : Number
The angle at which to start the ticks and the ranges.
Gauge
  tickEndValue : Number
The numeric value to assicoate with the endAngle.
Gauge
  tickLabelFactory : IFactory
The factory used to instantiate the tick labels.
Gauge
  tickLabelFunction : Function
The label function that determines the label for the tick.
Gauge
  tickLabelPrecision : Number
Precision of the tick labels
Gauge
  tickMajorColor : uint
The color of the major tick Default: white
Gauge
  tickMajorLabelStyleName : String
The style name to apply to the major tick labels Default: tickMajorLabel
Gauge
  tickMajorLength : uint
The length of the major tick Default: 22
Gauge
  tickMajorStartOffset : Number
The start offset at which to being drawing the major tick.
Gauge
  tickMajorStep : Number
The numeric difference between two major ticks.
Gauge
  tickMajorThickness : int
The thickness of the major tick Default: 2
Gauge
  tickMinorColor : uint
The color of the minor tick Default: white
Gauge
  tickMinorLabelStyleName : String
The style name ot apply to the minor tick labels Default: tickMinorLabel
Gauge
  tickMinorLength : uint
The length of the minor tick Default: 16
Gauge
  tickMinorStartOffset : Number
The start offset at which to being drawing the minor tick.
Gauge
  tickMinorStep : Number
The numeric difference between two minor ticks Default: 5
Gauge
  tickMinorThickness : int
The thickness of the minor tick Default: 2
Gauge
  tickShowMajorLabels : Boolean
Whether or not to show major tick labels Default: true
Gauge
  tickShowMinorLabels : Boolean
Whether or not to show values for minor tick labels Default: false
Gauge
  tickStartValue : Number
The numeric value to assicoate with the startAngle.
Gauge
  tickSteps : Array
For custom drawn ticks, where we provide the tick steps.
Gauge
  tooltipBehavior : TooltipBehavior
Gauge
  useElements : Boolean
[read-only] Whether to use addElement or addChild;
Gauge
Public Methods
 MethodDefined By
  
Gauge
  
getPositionForValue(val:*, index:int = -1):Number
Given a value between tickStartValue and tickEndValue, For Circular Gauge returns an angle between startAngle and endAngle.
Gauge
  
Removes the spinner and sets the bodyContainer.alpha back to 1
Gauge
  
Drops and recreates all tick labels and ticks
Gauge
  
showSpinner(msg:String):void
Shows the spinner with default values defined below: Label: "Loading please wait" X Position : center X of the grid Y Position : center Y of the grid Grid Alpa when the spinner is active : 0.3 Spinner appearance can be modified using styles .
Gauge
  
showToaster(message:String, toasterPosition:String, toasterRenderer:IFactory = null, animationDuration:Number = 1000, visibleDuration:Number = 5000, moveAnimate:Boolean = true, fadeAnimate:Boolean = true):void
[override] Shows the given toaster message
Gauge
Protected Methods
 MethodDefined By
  
mouseMoveHandler(event:MouseEvent):void
Handler for the mouse move event.
Gauge
  
mouseOutHandler(event:MouseEvent):void
Handler for the mouse out event.
Gauge
Styles
 Style Description Defined By
  
spinnerColors
Type: Array Format: Color
Colors for the spinners as an array. First element for the circle color and second for the spinner color
Gauge
  
spinnerGridAlpha
Type: Number Format: Length
Background color of the grid when the spinner is active
Gauge
  
spinnerLabelBackgroundColor
Type: uint Format: Color
Bacground color for the box in which the label is displayed
Gauge
  
spinnerLabelColor
Type: uint Format: Color CSS Inheritance: yes
Label color for the spinner
Gauge
  
spinnerLabelfontFamily
Type: String CSS Inheritance: yes
Label font family
Gauge
  
spinnerLabelfontSize
Type: Number Format: Length CSS Inheritance: yes
Label font size
Gauge
  
spinnerLabelfontStyle
Type: String CSS Inheritance: yes
Label font style
Gauge
  
spinnerLabelfontThickness
Type: Number CSS Inheritance: yes
Label font thinkcness
Gauge
  
spinnerLabelfontWeight
Type: String CSS Inheritance: yes
Label font weight
Gauge
  
spinnerLabelShowBackground
Type: Boolean
A flag that controls whether or not to show the spinner.
Gauge
  
spinnerRadius
Type: Number Format: Length
Spinner radius , default value is 10
Gauge
  
spinnerThickness
Type: Number Format: Length
Spinner thickness , default value is 5
Gauge
Property Detail
activeRangeInfoproperty
activeRangeInfo:RangeInfo  [read-only]

Gets the range info object within which the current gauge value falls.

This property can be used as the source for data binding.


Implementation
    public function get activeRangeInfo():RangeInfo
animateproperty 
animate:Boolean

Whether or not to animate the gauges.


Implementation
    public function get animate():Boolean
    public function set animate(value:Boolean):void
animationDurationproperty 
animationDuration:Number

The number of milliseconds to run the animation for. Default: 1000


Implementation
    public function get animationDuration():Number
    public function set animationDuration(value:Number):void
circleSizeproperty 
circleSize:Number  [read-only]

This property can be used as the source for data binding.


Implementation
    public function get circleSize():Number
convertZeroesToAlphaproperty 
convertZeroesToAlpha:Boolean

Flag to convert thousands, millions and billions into Alpha representations. 1000 will be converted to 1K, 100000 to 1M, 1000000000 to 1B etc to conserve space.


Implementation
    public function get convertZeroesToAlpha():Boolean
    public function set convertZeroesToAlpha(value:Boolean):void
currentTipproperty 
public var currentTip:IToolTip

The current instance of the data tip for this control

dataproperty 
data:Object


Implementation
    public function get data():Object
    public function set data(value:Object):void
dataTipFunctionproperty 
public var dataTipFunction:Function

A function that gets called to retrieve the text to be displayed in the tooltip behavior. Takes an instance of the gauge and should return a string.

dataTipRendererproperty 
public var dataTipRenderer:IFactory

Renderer for the data tip. Must implement IToolTip

dialColorproperty 
dialColor:Number

This property can be used as the source for data binding.


Implementation
    public function get dialColor():Number
    public function set dialColor(value:Number):void
dialColorGradientBrightnessproperty 
dialColorGradientBrightness:Number

This property can be used as the source for data binding.


Implementation
    public function get dialColorGradientBrightness():Number
    public function set dialColorGradientBrightness(value:Number):void
dialColorGradientDarknessproperty 
dialColorGradientDarkness:Number

This property can be used as the source for data binding.


Implementation
    public function get dialColorGradientDarkness():Number
    public function set dialColorGradientDarkness(value:Number):void
dialLinearGradientproperty 
dialLinearGradient:Boolean

This property can be used as the source for data binding.


Implementation
    public function get dialLinearGradient():Boolean
    public function set dialLinearGradient(value:Boolean):void
dialRimColorproperty 
dialRimColor:Number

This property can be used as the source for data binding.


Implementation
    public function get dialRimColor():Number
    public function set dialRimColor(value:Number):void
dialTitleproperty 
dialTitle:String

The text for the title of the dial.

This property can be used as the source for data binding.


Implementation
    public function get dialTitle():String
    public function set dialTitle(value:String):void
dialTitleStyleNameproperty 
dialTitleStyleName:String

The style name to apply to the dial title Default: dialText - textAlign:center;color:#3c3c3c;

This property can be used as the source for data binding.


Implementation
    public function get dialTitleStyleName():String
    public function set dialTitleStyleName(value:String):void
diameterproperty 
diameter:Number

By default, returns width.

This property can be used as the source for data binding.


Implementation
    public function get diameter():Number
    public function set diameter(value:Number):void
elementsToBlurproperty 
elementsToBlur:Array  [read-only]


Implementation
    public function get elementsToBlur():Array
elementToCenterproperty 
elementToCenter:IUIComponent  [read-only]


Implementation
    public function get elementToCenter():IUIComponent
endAngleproperty 
endAngle:Number

The angle at which to end the ticks and the ranges. This is measured clock wise. The reference point is 0 degrees, which points in the 3 0 clock position. Ensure that this value is greater than the startAngle, even if it goes above 360. Default: 405

This property can be used as the source for data binding.


Implementation
    public function get endAngle():Number
    public function set endAngle(value:Number):void
gaugeValueproperty 
gaugeValue:Number

The value to show for the dial

This property can be used as the source for data binding.


Implementation
    public function get gaugeValue():Number
    public function set gaugeValue(value:Number):void
gaugeValueStyleNameproperty 
gaugeValueStyleName:String

The style name to apply to the dial value Default: gaugeValueText - textAlign:center;color:#3c3c3c;

This property can be used as the source for data binding.


Implementation
    public function get gaugeValueStyleName():String
    public function set gaugeValueStyleName(value:String):void
labelRotationproperty 
labelRotation:Number

The degrees to rotate the label by


Implementation
    public function get labelRotation():Number
    public function set labelRotation(value:Number):void
labelXOffsetproperty 
labelXOffset:Number

To accomodate various positioning scenarios, the default calculation of the labels can be changed. This property lets you move the labels by a specific amount to the left or right


Implementation
    public function get labelXOffset():Number
    public function set labelXOffset(value:Number):void
labelYOffsetproperty 
labelYOffset:Number

To accomodate various positioning scenarios, the default calculation of the labels can be changed. This property lets you move the labels by a specific amount to the top or bottom


Implementation
    public function get labelYOffset():Number
    public function set labelYOffset(value:Number):void
needleBaseColorproperty 
needleBaseColor:Number

This property can be used as the source for data binding.


Implementation
    public function get needleBaseColor():Number
    public function set needleBaseColor(value:Number):void
needleColorproperty 
needleColor:Number

This property can be used as the source for data binding.


Implementation
    public function get needleColor():Number
    public function set needleColor(value:Number):void
needleRotationproperty 
needleRotation:Number  [read-only]

In normal state, needle is in the 9 o clock position. On basis of startAngle, tickStartValue, tickEndValue, and gaugeValue, we calculate the needleRoation.

This property can be used as the source for data binding.


Implementation
    public function get needleRotation():Number
needleThicknessproperty 
needleThickness:Number

This property can be used as the source for data binding.


Implementation
    public function get needleThickness():Number
    public function set needleThickness(value:Number):void
rangeGapproperty 
rangeGap:Number

Distance between the edge of the dial, and the edge of the range arc as well as the needle tip.

This property can be used as the source for data binding.


Implementation
    public function get rangeGap():Number
    public function set rangeGap(value:Number):void
rangesproperty 
ranges:Array

An array of RangeInfo Objects that define the ranges of the gauge.

This property can be used as the source for data binding.


Implementation
    public function get ranges():Array
    public function set ranges(value:Array):void
rangeThicknessproperty 
rangeThickness:Number

The thickness of the range lines.

This property can be used as the source for data binding.


Implementation
    public function get rangeThickness():Number
    public function set rangeThickness(value:Number):void
showGaugeValueproperty 
showGaugeValue:Boolean

Flag whether or not to show the gauge value. For the dial text, you can just set the dialText to blank string.

This property can be used as the source for data binding.


Implementation
    public function get showGaugeValue():Boolean
    public function set showGaugeValue(value:Boolean):void
showSpinnerOnCreationCompleteproperty 
showSpinnerOnCreationComplete:Boolean


Implementation
    public function get showSpinnerOnCreationComplete():Boolean
    public function set showSpinnerOnCreationComplete(value:Boolean):void
spinnerproperty 
spinner:ISpinner


Implementation
    public function get spinner():ISpinner
    public function set spinner(value:ISpinner):void
spinnerBehaviorproperty 
public var spinnerBehavior:SpinnerBehavior

spinnerFactoryproperty 
spinnerFactory:IFactory

Factory responsible for instantiating a new spinner. Defaults to com.flexicious.Spinner. Needs to implement com.flexicious.interfaces.ISpinner, and extend UIComponent


Implementation
    public function get spinnerFactory():IFactory
    public function set spinnerFactory(value:IFactory):void
spinnerLabelproperty 
spinnerLabel:String

The label of the spinner control, you can use styles to control the appearance.


Implementation
    public function get spinnerLabel():String
    public function set spinnerLabel(value:String):void
spinnerParentproperty 
spinnerParent:Object  [read-only]


Implementation
    public function get spinnerParent():Object
startAngleproperty 
startAngle:Number

The angle at which to start the ticks and the ranges. This is measured clock wise. The reference point is 0 degrees, which points in the 3 0 clock position Default: 135

This property can be used as the source for data binding.


Implementation
    public function get startAngle():Number
    public function set startAngle(value:Number):void
tickEndValueproperty 
tickEndValue:Number

The numeric value to assicoate with the endAngle. In other words, the end of the dial scale.

This property can be used as the source for data binding.


Implementation
    public function get tickEndValue():Number
    public function set tickEndValue(value:Number):void
tickLabelFactoryproperty 
tickLabelFactory:IFactory

The factory used to instantiate the tick labels. Default: spark.components.Label

This property can be used as the source for data binding.


Implementation
    public function get tickLabelFactory():IFactory
    public function set tickLabelFactory(value:IFactory):void
tickLabelFunctionproperty 
tickLabelFunction:Function

The label function that determines the label for the tick. Gets the default text that the tick would have gotten, as well as the tick index.


Implementation
    public function get tickLabelFunction():Function
    public function set tickLabelFunction(value:Function):void
tickLabelPrecisionproperty 
tickLabelPrecision:Number

Precision of the tick labels


Implementation
    public function get tickLabelPrecision():Number
    public function set tickLabelPrecision(value:Number):void
tickMajorColorproperty 
tickMajorColor:uint

The color of the major tick Default: white

This property can be used as the source for data binding.


Implementation
    public function get tickMajorColor():uint
    public function set tickMajorColor(value:uint):void
tickMajorLabelStyleNameproperty 
tickMajorLabelStyleName:String

The style name to apply to the major tick labels Default: tickMajorLabel

This property can be used as the source for data binding.


Implementation
    public function get tickMajorLabelStyleName():String
    public function set tickMajorLabelStyleName(value:String):void
tickMajorLengthproperty 
tickMajorLength:uint

The length of the major tick Default: 22

This property can be used as the source for data binding.


Implementation
    public function get tickMajorLength():uint
    public function set tickMajorLength(value:uint):void
tickMajorStartOffsetproperty 
tickMajorStartOffset:Number

The start offset at which to being drawing the major tick. This is the inner position, i.e. towards the center. The distance from the edge of the rangeGap the top of the tick Default: 18

This property can be used as the source for data binding.


Implementation
    public function get tickMajorStartOffset():Number
    public function set tickMajorStartOffset(value:Number):void
tickMajorStepproperty 
tickMajorStep:Number

The numeric difference between two major ticks. Default: 20

This property can be used as the source for data binding.


Implementation
    public function get tickMajorStep():Number
    public function set tickMajorStep(value:Number):void
tickMajorThicknessproperty 
tickMajorThickness:int

The thickness of the major tick Default: 2

This property can be used as the source for data binding.


Implementation
    public function get tickMajorThickness():int
    public function set tickMajorThickness(value:int):void
tickMinorColorproperty 
tickMinorColor:uint

The color of the minor tick Default: white

This property can be used as the source for data binding.


Implementation
    public function get tickMinorColor():uint
    public function set tickMinorColor(value:uint):void
tickMinorLabelStyleNameproperty 
tickMinorLabelStyleName:String

The style name ot apply to the minor tick labels Default: tickMinorLabel

This property can be used as the source for data binding.


Implementation
    public function get tickMinorLabelStyleName():String
    public function set tickMinorLabelStyleName(value:String):void
tickMinorLengthproperty 
tickMinorLength:uint

The length of the minor tick Default: 16

This property can be used as the source for data binding.


Implementation
    public function get tickMinorLength():uint
    public function set tickMinorLength(value:uint):void
tickMinorStartOffsetproperty 
tickMinorStartOffset:Number

The start offset at which to being drawing the minor tick. This is the inner position, i.e. towards the center. The distance from the edge of the rangeGap the top of the tick Default: 11

This property can be used as the source for data binding.


Implementation
    public function get tickMinorStartOffset():Number
    public function set tickMinorStartOffset(value:Number):void
tickMinorStepproperty 
tickMinorStep:Number

The numeric difference between two minor ticks Default: 5

This property can be used as the source for data binding.


Implementation
    public function get tickMinorStep():Number
    public function set tickMinorStep(value:Number):void
tickMinorThicknessproperty 
tickMinorThickness:int

The thickness of the minor tick Default: 2

This property can be used as the source for data binding.


Implementation
    public function get tickMinorThickness():int
    public function set tickMinorThickness(value:int):void
tickShowMajorLabelsproperty 
tickShowMajorLabels:Boolean

Whether or not to show major tick labels Default: true

This property can be used as the source for data binding.


Implementation
    public function get tickShowMajorLabels():Boolean
    public function set tickShowMajorLabels(value:Boolean):void
tickShowMinorLabelsproperty 
tickShowMinorLabels:Boolean

Whether or not to show values for minor tick labels Default: false

This property can be used as the source for data binding.


Implementation
    public function get tickShowMinorLabels():Boolean
    public function set tickShowMinorLabels(value:Boolean):void
tickStartValueproperty 
tickStartValue:Number

The numeric value to assicoate with the startAngle. In other words, the beginning of the dial scale.

This property can be used as the source for data binding.


Implementation
    public function get tickStartValue():Number
    public function set tickStartValue(value:Number):void
tickStepsproperty 
tickSteps:Array

For custom drawn ticks, where we provide the tick steps. Used by horizontal and vertical axes for charts


Implementation
    public function get tickSteps():Array
    public function set tickSteps(value:Array):void
tooltipBehaviorproperty 
public var tooltipBehavior:TooltipBehavior

useElementsproperty 
useElements:Boolean  [read-only]

Whether to use addElement or addChild;


Implementation
    public function get useElements():Boolean
Constructor Detail
Gauge()Constructor
public function Gauge()



Method Detail
getPositionForValue()method
public function getPositionForValue(val:*, index:int = -1):Number

Given a value between tickStartValue and tickEndValue, For Circular Gauge returns an angle between startAngle and endAngle. For HLinear Gauge returns a value for the X position based on width For VLinear Gauge returns a value for the Y position based on height

Parameters

val:*
 
index:int (default = -1)

Returns
Number
hideSpinner()method 
public function hideSpinner():void

Removes the spinner and sets the bodyContainer.alpha back to 1

invalidateTicks()method 
public function invalidateTicks():void

Drops and recreates all tick labels and ticks

mouseMoveHandler()method 
protected function mouseMoveHandler(event:MouseEvent):void

Handler for the mouse move event.

Parameters

event:MouseEvent

mouseOutHandler()method 
protected function mouseOutHandler(event:MouseEvent):void

Handler for the mouse out event. Hides the data tip, if any

Parameters

event:MouseEvent

showSpinner()method 
public function showSpinner(msg:String):void

Shows the spinner with default values defined below: Label: "Loading please wait" X Position : center X of the grid Y Position : center Y of the grid Grid Alpa when the spinner is active : 0.3 Spinner appearance can be modified using styles .

Parameters

msg:String

showToaster()method 
override public function showToaster(message:String, toasterPosition:String, toasterRenderer:IFactory = null, animationDuration:Number = 1000, visibleDuration:Number = 5000, moveAnimate:Boolean = true, fadeAnimate:Boolean = true):void

Shows the given toaster message

Parameters

message:String — The message to display in the toaster notification
 
toasterPosition:String (default = NaN) — A classfactory for the actual renderer control. Defaults to DefaultToasterRenderer.
 
toasterRenderer:IFactory (default = null) — Number of milli seconds to animate the move or the fade animation for the toaster to appear and disappear. Defaults to 1000
 
animationDuration:Number (default = 1000) — Number of milli seconds to keep the toaster visible. Defaults to 5000
 
visibleDuration:Number (default = 5000) — The position for the toaster. One of the Toaster.POSITION_XXXX constants. Defaults to Toaster.POSITION_BOTTOM_RIGHT
 
moveAnimate:Boolean (default = true) — Whether to use the move animation.
 
fadeAnimate:Boolean (default = true) — Whether to use the fade animation.