Packagecom.yahoo.astra.fl.charts.axes
Classpublic class TimeAxis
InheritanceTimeAxis Inheritance BaseAxis
ImplementsIAxis, IStackingAxis

An axis type representing a date and time range from minimum to maximum with major and minor divisions.



Public Properties
 PropertyDefined by
 Inheritedchart : IChart
The chart in which this axis appears.
BaseAxis
 InheriteddataProvider : Array
Data provider for the axis
BaseAxis
 InheritedlabelFunction : Function
BaseAxis
 InheritedlabelSpacing : Number
The space, in pixels, between labels on an axis.
BaseAxis
  majorTimeUnit : String
Combined with majorUnit, determines the amount of time between major ticks and labels.
TimeAxis
  majorUnit : Number
The major unit at which new lines are drawn.
TimeAxis
  maximum : Date
The maximum value displayed on the axis.
TimeAxis
 InheritedmaxLabelHeight : Number
Gets or sets the maximum height of a label
BaseAxis
 InheritedmaxLabelWidth : Number
Gets or sets the maximum width of a label
BaseAxis
  minimum : Date
The minimum value displayed on the axis.
TimeAxis
  minorTimeUnit : String
Combined with minorUnit, determines the amount of time between minor ticks.
TimeAxis
  minorUnit : Number
The minor unit at which new lines are drawn.
TimeAxis
  numLabels : Number
TimeAxis
 Inheritedrenderer : IAxisRenderer
The visual renderer applied to this axis.
BaseAxis
 Inheritedreverse : Boolean
Sets the direction of the labels and other visual objects along the axis.
BaseAxis
  snapToUnits : Boolean
If true, the labels, ticks, gridlines, and other objects will snap to the nearest major or minor unit.
TimeAxis
  stackingEnabled : Boolean
If true, the axis will allow the stacking of series that implement the interface IStackedSeries.
TimeAxis
 Inheritedtitle : String
The text that will appear next to the axis to indicate information about the data that it displays.
BaseAxis
Protected Properties
 PropertyDefined by
  positionMultiplier : Number = 0
TimeAxis
Public Methods
 MethodDefined by
  
Constructor.
TimeAxis
  
getMaxLabel():String
Returns the maximum string length of a label on the axis.
TimeAxis
  
stack(top:Object, ... rest):Object
Calculates the sum of values if they were stacked on the axis.
TimeAxis
  
updateScale():void
Determines the axis scale based on the input data set.
TimeAxis
  
valueToLabel(value:Object):String
Converts a value on the axis to formatted label text.
TimeAxis
  
valueToLocal(value:Object):Number
Calculates the position of a data point along the axis.
TimeAxis
Property detail
majorTimeUnitproperty
majorTimeUnit:String  [read-write]

Combined with majorUnit, determines the amount of time between major ticks and labels.

Implementation
    public function get majorTimeUnit():String
    public function set majorTimeUnit(value:String):void

See also

com.yahoo.astra.fl.charts.TimeUnit;
majorUnitproperty 
majorUnit:Number  [read-write]

The major unit at which new lines are drawn.

Implementation
    public function get majorUnit():Number
    public function set majorUnit(value:Number):void
maximumproperty 
maximum:Date  [read-write]

The maximum value displayed on the axis.

Implementation
    public function get maximum():Date
    public function set maximum(value:Date):void
minimumproperty 
minimum:Date  [read-write]

The minimum value displayed on the axis.

Implementation
    public function get minimum():Date
    public function set minimum(value:Date):void
minorTimeUnitproperty 
minorTimeUnit:String  [read-write]

Combined with minorUnit, determines the amount of time between minor ticks.

Implementation
    public function get minorTimeUnit():String
    public function set minorTimeUnit(value:String):void

See also

com.yahoo.astra.fl.charts.TimeUnit;
minorUnitproperty 
minorUnit:Number  [read-write]

The minor unit at which new lines are drawn.

Implementation
    public function get minorUnit():Number
    public function set minorUnit(value:Number):void
numLabelsproperty 
numLabels:Number  [read-write]

Implementation
    public function get numLabels():Number
    public function set numLabels(value:Number):void
positionMultiplierproperty 
protected var positionMultiplier:Number = 0
snapToUnitsproperty 
snapToUnits:Boolean  [read-write]

If true, the labels, ticks, gridlines, and other objects will snap to the nearest major or minor unit. If false, their position will be based on the minimum value.

Implementation
    public function get snapToUnits():Boolean
    public function set snapToUnits(value:Boolean):void
stackingEnabledproperty 
stackingEnabled:Boolean  [read-write]

If true, the axis will allow the stacking of series that implement the interface IStackedSeries.

Must be explicitly enabled. Implementation
    public function get stackingEnabled():Boolean
    public function set stackingEnabled(value:Boolean):void

Constructor detail
TimeAxis()constructor
public function TimeAxis()

Constructor.

Method detail
getMaxLabel()method
public function getMaxLabel():String

Returns the maximum string length of a label on the axis.

Returns
String — the formatted label
stack()method 
public function stack(top:Object, ... rest):Object

Calculates the sum of values if they were stacked on the axis. The first value is important because some axis types, such as NumericAxis, may differentiate between positive and negative values.

Parameters
top:Object
 
... rest

Returns
Object
updateScale()method 
public function updateScale():void

Determines the axis scale based on the input data set. Seperating this function from the draw method optimizes processing time, and it allows the chart to synchronize its axes.

valueToLabel()method 
public override function valueToLabel(value:Object):String

Converts a value on the axis to formatted label text.

Parameters
value:Object — the value of the item for which a label is needed

Returns
String — the formatted label text
valueToLocal()method 
public function valueToLocal(value:Object):Number

Calculates the position of a data point along the axis.

Parameters
value:Object — The data used to determine the position

Returns
Number — The display position in pixels on the axis