Package | com.flexicious.components.visualization.gaugesupport |
Class | public class GaugeUtils |
Inheritance | GaugeUtils Object |
Method | Defined By | ||
---|---|---|---|
animateNeedle(hostComponent:Gauge, controls:Array, from:Number, to:Number, gaugeStyle:String = circular):void [static]
Given a Gauge hostComponent, if the animate flag is on, creates a rotate instance for from and to and targets the passed in controls array
| GaugeUtils | ||
drawArc(g:Graphics, centerX:Number, centerY:Number, radius:Number, angleBegin:Number, arcAngle:Number, steps:Number):void [static]
Draws an arc using the graphics object supplied
| GaugeUtils | ||
drawRanges(hostComponent:Gauge, ranges:Group, gaugeStyle:String = circular, arcSteps:Number = 50):void [static]
Draws the range arcs for a circular gauge control. | GaugeUtils | ||
drawTicks(hostComponent:Gauge, tickHolder:Group, gaugeStyle:String = circular, lblOffsetX:Number = 0, lblOffsetY:Number = 0, reverse:Boolean = false, extendToChart:Boolean = false, labelRotation:Number = 0):void [static]
Draws the ticks for the gauge. | GaugeUtils |
Constant | Defined By | ||
---|---|---|---|
degToRad : Number = 0.0174532925 [static]
Multiple to convert degrees to radians. | GaugeUtils | ||
GAUGE_STYLE_CIRCULAR : String = circular [static]
Circular Gauge Style constant
| GaugeUtils | ||
GAUGE_STYLE_HBULLET : String = hbullet [static]
Circular Gauge Style constant
| GaugeUtils | ||
GAUGE_STYLE_HLINEAR : String = hlinear [static]
Circular Gauge Style constant
| GaugeUtils | ||
GAUGE_STYLE_VBULLET : String = ybullet [static]
Circular Gauge Style constant
| GaugeUtils | ||
GAUGE_STYLE_VLINEAR : String = vlinear [static]
Circular Gauge Style constant
| GaugeUtils |
animateNeedle | () | method |
public static function animateNeedle(hostComponent:Gauge, controls:Array, from:Number, to:Number, gaugeStyle:String = circular):void
Given a Gauge hostComponent, if the animate flag is on, creates a rotate instance for from and to and targets the passed in controls array
Parameters
hostComponent:Gauge — A Gauge component.
| |
controls:Array — The controls to rotate, Usually the needle and the needle base
| |
from:Number — The angle to begin the rotation at
| |
to:Number — The angle to end the rotation at
| |
gaugeStyle:String (default = circular )
|
drawArc | () | method |
public static function drawArc(g:Graphics, centerX:Number, centerY:Number, radius:Number, angleBegin:Number, arcAngle:Number, steps:Number):void
Draws an arc using the graphics object supplied
Parameters
g:Graphics — The center point X
| |
centerX:Number — The center point Y
| |
centerY:Number — The radius at which to draw the arc
| |
radius:Number — The angle where to begin the arc
| |
angleBegin:Number — The angle where to end the arc
| |
arcAngle:Number — In flex, there are no primitives to draw a perfect circle. Instead, we draw small lines. The higher the value of the steps, the more perfect the circle would be.
| |
steps:Number |
drawRanges | () | method |
public static function drawRanges(hostComponent:Gauge, ranges:Group, gaugeStyle:String = circular, arcSteps:Number = 50):void
Draws the range arcs for a circular gauge control.
Parameters
hostComponent:Gauge — A Circular (full, vertical or horizontal) Gauge control
| |
ranges:Group — An array of RangeInfo objects.
| |
gaugeStyle:String (default = circular )
| |
arcSteps:Number (default = 50 )
|
drawTicks | () | method |
public static function drawTicks(hostComponent:Gauge, tickHolder:Group, gaugeStyle:String = circular, lblOffsetX:Number = 0, lblOffsetY:Number = 0, reverse:Boolean = false, extendToChart:Boolean = false, labelRotation:Number = 0):void
Draws the ticks for the gauge. Assumes hostComponent is a circular gauge.
Parameters
hostComponent:Gauge — The Gauge component
| |
tickHolder:Group — The part of the skin that is responsible for holding the tick labels and marks
| |
gaugeStyle:String (default = circular ) — Can be one of three values - circular, vlinear, or hlinear
| |
lblOffsetX:Number (default = 0 )
| |
lblOffsetY:Number (default = 0 )
| |
reverse:Boolean (default = false )
| |
extendToChart:Boolean (default = false )
| |
labelRotation:Number (default = 0 )
|
degToRad | Constant |
public static const degToRad:Number = 0.0174532925
Multiple to convert degrees to radians.
GAUGE_STYLE_CIRCULAR | Constant |
public static const GAUGE_STYLE_CIRCULAR:String = circular
Circular Gauge Style constant
GAUGE_STYLE_HBULLET | Constant |
public static const GAUGE_STYLE_HBULLET:String = hbullet
Circular Gauge Style constant
GAUGE_STYLE_HLINEAR | Constant |
public static const GAUGE_STYLE_HLINEAR:String = hlinear
Circular Gauge Style constant
GAUGE_STYLE_VBULLET | Constant |
public static const GAUGE_STYLE_VBULLET:String = ybullet
Circular Gauge Style constant
GAUGE_STYLE_VLINEAR | Constant |
public static const GAUGE_STYLE_VLINEAR:String = vlinear
Circular Gauge Style constant