Package | com.flexicious.components.visualization |
Class | public class Gauge |
Inheritance | Gauge ![]() |
Implements | ISpinnerOwner, mx.controls.listClasses.IListItemRenderer |
Subclasses | AxisBase, HorizontalLinearGauge, HorizontalSemiCircleGauge, TrafficLight, VerticalLinearGauge, VerticalSemiCircleGauge |
Default MXML PropertymxmlContentFactory
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
Gauge() | 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 | ||
hideSpinner():void
Removes the spinner and sets the bodyContainer.alpha back to 1
| Gauge | ||
invalidateTicks():void
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 |
Method | Defined By | ||
---|---|---|---|
mouseMoveHandler(event:MouseEvent):void
Handler for the mouse move event. | Gauge | ||
mouseOutHandler(event:MouseEvent):void
Handler for the mouse out event. | Gauge |
activeRangeInfo | property |
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.
public function get activeRangeInfo():RangeInfo
animate | property |
animate:Boolean
Whether or not to animate the gauges.
public function get animate():Boolean
public function set animate(value:Boolean):void
animationDuration | property |
animationDuration:Number
The number of milliseconds to run the animation for. Default: 1000
public function get animationDuration():Number
public function set animationDuration(value:Number):void
circleSize | property |
circleSize:Number
[read-only] This property can be used as the source for data binding.
public function get circleSize():Number
convertZeroesToAlpha | property |
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.
public function get convertZeroesToAlpha():Boolean
public function set convertZeroesToAlpha(value:Boolean):void
currentTip | property |
public var currentTip:IToolTip
The current instance of the data tip for this control
data | property |
data:Object
public function get data():Object
public function set data(value:Object):void
dataTipFunction | property |
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.
dataTipRenderer | property |
public var dataTipRenderer:IFactory
Renderer for the data tip. Must implement IToolTip
dialColor | property |
dialColor:Number
This property can be used as the source for data binding.
public function get dialColor():Number
public function set dialColor(value:Number):void
dialColorGradientBrightness | property |
dialColorGradientBrightness:Number
This property can be used as the source for data binding.
public function get dialColorGradientBrightness():Number
public function set dialColorGradientBrightness(value:Number):void
dialColorGradientDarkness | property |
dialColorGradientDarkness:Number
This property can be used as the source for data binding.
public function get dialColorGradientDarkness():Number
public function set dialColorGradientDarkness(value:Number):void
dialLinearGradient | property |
dialLinearGradient:Boolean
This property can be used as the source for data binding.
public function get dialLinearGradient():Boolean
public function set dialLinearGradient(value:Boolean):void
dialRimColor | property |
dialRimColor:Number
This property can be used as the source for data binding.
public function get dialRimColor():Number
public function set dialRimColor(value:Number):void
dialTitle | property |
dialTitle:String
The text for the title of the dial.
This property can be used as the source for data binding.
public function get dialTitle():String
public function set dialTitle(value:String):void
dialTitleStyleName | property |
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.
public function get dialTitleStyleName():String
public function set dialTitleStyleName(value:String):void
diameter | property |
diameter:Number
By default, returns width.
This property can be used as the source for data binding.
public function get diameter():Number
public function set diameter(value:Number):void
elementsToBlur | property |
elementsToBlur:Array
[read-only] public function get elementsToBlur():Array
elementToCenter | property |
elementToCenter:IUIComponent
[read-only] public function get elementToCenter():IUIComponent
endAngle | property |
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.
public function get endAngle():Number
public function set endAngle(value:Number):void
gaugeValue | property |
gaugeValue:Number
The value to show for the dial
This property can be used as the source for data binding.
public function get gaugeValue():Number
public function set gaugeValue(value:Number):void
gaugeValueStyleName | property |
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.
public function get gaugeValueStyleName():String
public function set gaugeValueStyleName(value:String):void
labelRotation | property |
labelRotation:Number
The degrees to rotate the label by
public function get labelRotation():Number
public function set labelRotation(value:Number):void
labelXOffset | property |
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
public function get labelXOffset():Number
public function set labelXOffset(value:Number):void
labelYOffset | property |
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
public function get labelYOffset():Number
public function set labelYOffset(value:Number):void
needleBaseColor | property |
needleBaseColor:Number
This property can be used as the source for data binding.
public function get needleBaseColor():Number
public function set needleBaseColor(value:Number):void
needleColor | property |
needleColor:Number
This property can be used as the source for data binding.
public function get needleColor():Number
public function set needleColor(value:Number):void
needleRotation | property |
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.
public function get needleRotation():Number
needleThickness | property |
needleThickness:Number
This property can be used as the source for data binding.
public function get needleThickness():Number
public function set needleThickness(value:Number):void
rangeGap | property |
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.
public function get rangeGap():Number
public function set rangeGap(value:Number):void
ranges | property |
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.
public function get ranges():Array
public function set ranges(value:Array):void
rangeThickness | property |
rangeThickness:Number
The thickness of the range lines.
This property can be used as the source for data binding.
public function get rangeThickness():Number
public function set rangeThickness(value:Number):void
showGaugeValue | property |
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.
public function get showGaugeValue():Boolean
public function set showGaugeValue(value:Boolean):void
showSpinnerOnCreationComplete | property |
showSpinnerOnCreationComplete:Boolean
public function get showSpinnerOnCreationComplete():Boolean
public function set showSpinnerOnCreationComplete(value:Boolean):void
spinner | property |
spinner:ISpinner
public function get spinner():ISpinner
public function set spinner(value:ISpinner):void
spinnerBehavior | property |
public var spinnerBehavior:SpinnerBehavior
spinnerFactory | property |
spinnerFactory:IFactory
Factory responsible for instantiating a new spinner. Defaults to com.flexicious.Spinner. Needs to implement com.flexicious.interfaces.ISpinner, and extend UIComponent
public function get spinnerFactory():IFactory
public function set spinnerFactory(value:IFactory):void
spinnerLabel | property |
spinnerLabel:String
The label of the spinner control, you can use styles to control the appearance.
public function get spinnerLabel():String
public function set spinnerLabel(value:String):void
spinnerParent | property |
spinnerParent:Object
[read-only] public function get spinnerParent():Object
startAngle | property |
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.
public function get startAngle():Number
public function set startAngle(value:Number):void
tickEndValue | property |
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.
public function get tickEndValue():Number
public function set tickEndValue(value:Number):void
tickLabelFactory | property |
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.
public function get tickLabelFactory():IFactory
public function set tickLabelFactory(value:IFactory):void
tickLabelFunction | property |
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.
public function get tickLabelFunction():Function
public function set tickLabelFunction(value:Function):void
tickLabelPrecision | property |
tickLabelPrecision:Number
Precision of the tick labels
public function get tickLabelPrecision():Number
public function set tickLabelPrecision(value:Number):void
tickMajorColor | property |
tickMajorColor:uint
The color of the major tick Default: white
This property can be used as the source for data binding.
public function get tickMajorColor():uint
public function set tickMajorColor(value:uint):void
tickMajorLabelStyleName | property |
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.
public function get tickMajorLabelStyleName():String
public function set tickMajorLabelStyleName(value:String):void
tickMajorLength | property |
tickMajorLength:uint
The length of the major tick Default: 22
This property can be used as the source for data binding.
public function get tickMajorLength():uint
public function set tickMajorLength(value:uint):void
tickMajorStartOffset | property |
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.
public function get tickMajorStartOffset():Number
public function set tickMajorStartOffset(value:Number):void
tickMajorStep | property |
tickMajorStep:Number
The numeric difference between two major ticks. Default: 20
This property can be used as the source for data binding.
public function get tickMajorStep():Number
public function set tickMajorStep(value:Number):void
tickMajorThickness | property |
tickMajorThickness:int
The thickness of the major tick Default: 2
This property can be used as the source for data binding.
public function get tickMajorThickness():int
public function set tickMajorThickness(value:int):void
tickMinorColor | property |
tickMinorColor:uint
The color of the minor tick Default: white
This property can be used as the source for data binding.
public function get tickMinorColor():uint
public function set tickMinorColor(value:uint):void
tickMinorLabelStyleName | property |
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.
public function get tickMinorLabelStyleName():String
public function set tickMinorLabelStyleName(value:String):void
tickMinorLength | property |
tickMinorLength:uint
The length of the minor tick Default: 16
This property can be used as the source for data binding.
public function get tickMinorLength():uint
public function set tickMinorLength(value:uint):void
tickMinorStartOffset | property |
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.
public function get tickMinorStartOffset():Number
public function set tickMinorStartOffset(value:Number):void
tickMinorStep | property |
tickMinorStep:Number
The numeric difference between two minor ticks Default: 5
This property can be used as the source for data binding.
public function get tickMinorStep():Number
public function set tickMinorStep(value:Number):void
tickMinorThickness | property |
tickMinorThickness:int
The thickness of the minor tick Default: 2
This property can be used as the source for data binding.
public function get tickMinorThickness():int
public function set tickMinorThickness(value:int):void
tickShowMajorLabels | property |
tickShowMajorLabels:Boolean
Whether or not to show major tick labels Default: true
This property can be used as the source for data binding.
public function get tickShowMajorLabels():Boolean
public function set tickShowMajorLabels(value:Boolean):void
tickShowMinorLabels | property |
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.
public function get tickShowMinorLabels():Boolean
public function set tickShowMinorLabels(value:Boolean):void
tickStartValue | property |
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.
public function get tickStartValue():Number
public function set tickStartValue(value:Number):void
tickSteps | property |
tickSteps:Array
For custom drawn ticks, where we provide the tick steps. Used by horizontal and vertical axes for charts
public function get tickSteps():Array
public function set tickSteps(value:Array):void
tooltipBehavior | property |
public var tooltipBehavior:TooltipBehavior
useElements | property |
useElements:Boolean
[read-only] Whether to use addElement or addChild;
public function get useElements():Boolean
Gauge | () | Constructor |
public function Gauge()
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 )
|
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.
|