Packagecom.yahoo.astra.fl.charts
Interfacepublic interface IAxis extends flash.events.IEventDispatcher
ImplementorsAxis

A renderer for an axis on a chart.

Important: Must be a subclass of DisplayObject

See also

flash.display.DisplayObject


Public Properties
 PropertyDefined by
  contentBounds : Rectangle
[read-only] Represents the area where content should be drawn within the axis.
IAxis
  hideOverlappingLabels : Boolean
If true, labels that overlap previously drawn labels will be hidden.
IAxis
  labelFunction : Function
A function may be set to determine the text value of the labels.
IAxis
  orientation : String
Determines if the axis is displayed vertically or horizontally.
IAxis
  overflowEnabled : Boolean
Determines if items such as labels and other visual objects affect the contentBounds property of the axis.
IAxis
  plotArea : IPlotArea
The plot area to which this axis is associated.
IAxis
  reverse : Boolean
Sets the direction of the labels and other visual objects along the axis.
IAxis
  title : String
The text that will appear next to the axis to indicate information about the data that it displays.
IAxis
Public Methods
 MethodDefined by
  
localToValue(position:Number):Object
Calculates the value of a data point along the axis based on a position.
IAxis
  
updateBounds():void
Calculates the contentBounds value for the axis.
IAxis
  
updateScale(data:Array):void
Determines the axis scale based on the input data set.
IAxis
  
valueToLabel(value:Object):String
Converts a value on the axis to formatted label text.
IAxis
  
valueToLocal(value:Object):Number
Calculates the position of a data point along the axis.
IAxis
Styles
 StyleDescriptionDefined by
  
axisColor
Type: uint
The line color for the axis. The default value is #888a85.
IAxis
  
axisWeight
Type: int
The line weight for the axis. The default value is 1.
IAxis
  
gridLineColor
Type: uint
The line color for the grid lines on the axis. The default value is #babdb6.
IAxis
  
gridLineWeight
Type: int
The line weight, in pixels, for the grid lines on the axis. The default value is 1.
IAxis
  
labelDistance
Type: Number
The distance, in pixels, between a label and the axis. The default value is 2.
IAxis
  
minorGridLineColor
Type: uint
The line color for the minor grid lines on the axis. The default value is #eeeeec.
IAxis
  
minorGridLineWeight
Type: int
The line weight, in pixels, for the minor grid lines on the axis. The default value is 1.
IAxis
  
minorTickColor
Type: uint
The line color for the minor ticks on the axis. The default value is #888a85.
IAxis
  
minorTickLength
Type: Number
The length of the minor ticks on the axis. The default value is 3.
IAxis
  
minorTickPosition
Type: String
The position of the minor ticks on the axis. The default value is "outside".
IAxis
  
minorTickWeight
Type: int
The line weight for the minor ticks on the axis. The default value is 1.
IAxis
  
showGridLines
Type: Boolean
If true, grid lines will be displayed on the axis. The default value is false.
IAxis
  
showLabels
Type: Boolean
If true, labels are displayed on the axis. The default value is true.
IAxis
  
showMinorGridLines
Type: Boolean
If true, minor grid lines will be displayed on the axis. The default value is false.
IAxis
  
showMinorTicks
Type: Boolean
If true, ticks are displayed on the axis at minor positions. The default value is true.
IAxis
  
showTicks
Type: Boolean
If true, ticks are displayed on the axis. The default value is true.
IAxis
  
showTitle
Type: Boolean
If true, the axis title is displayed. The default value is true.
IAxis
  
tickColor
Type: uint
The line color for the ticks on the axis. The default value is #888a85.
IAxis
  
tickLength
Type: Number
The length of the ticks on the axis. The default value is 4.
IAxis
  
tickPosition
Type: String
The position of the ticks on the axis. The default value is "cross".
IAxis
  
tickWeight
Type: int
The line weight for the ticks on the axis. The default value is 1.
IAxis
  
titleTextFormat
Type: TextFormat
The TextFormat object to use to render the axis title label. The default value is TextFormat("_sans", 11, 0x000000, false, false, false, '', '', TextFormatAlign.LEFT, 0, 0, 0, 0).
IAxis
Property detail
contentBoundsproperty
contentBounds:Rectangle  [read-only]

Represents the area where content should be drawn within the axis. This value is used to determine the containing plot area's own contentBounds property.

Implementation
    public function get contentBounds():Rectangle

See also

hideOverlappingLabelsproperty 
hideOverlappingLabels:Boolean  [read-write]

If true, labels that overlap previously drawn labels will be hidden.

Implementation
    public function get hideOverlappingLabels():Boolean
    public function set hideOverlappingLabels(value:Boolean):void
labelFunctionproperty 
labelFunction:Function  [read-write]

A function may be set to determine the text value of the labels.

function labelFunction(value:Number):String

Implementation
    public function get labelFunction():Function
    public function set labelFunction(value:Function):void
orientationproperty 
orientation:String  [read-write]

Determines if the axis is displayed vertically or horizontally.

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

See also

overflowEnabledproperty 
overflowEnabled:Boolean  [read-write]

Determines if items such as labels and other visual objects affect the contentBounds property of the axis. If false, these objects may appear outside the chart bounds and overlap other display objects.

Implementation
    public function get overflowEnabled():Boolean
    public function set overflowEnabled(value:Boolean):void
plotAreaproperty 
plotArea:IPlotArea  [read-write]

The plot area to which this axis is associated.

Implementation
    public function get plotArea():IPlotArea
    public function set plotArea(value:IPlotArea):void
reverseproperty 
reverse:Boolean  [read-write]

Sets the direction of the labels and other visual objects along the axis. By default, vertical axes draw objects from bottom to top, and horizontal axes draw objects from left to right.

Implementation
    public function get reverse():Boolean
    public function set reverse(value:Boolean):void
titleproperty 
title:String  [read-write]

The text that will appear next to the axis to indicate information about the data that it displays.

Note: If the axis orientation value is "vertical", the title will only be displayed if the title font is embedded. Implementation
    public function get title():String
    public function set title(value:String):void

Method detail
localToValue()method
public function localToValue(position:Number):Object

Calculates the value of a data point along the axis based on a position.

Parameters
position:Number — The position in pixels used to determine the value

Returns
Object — The value on the axis at that position
updateBounds()method 
public function updateBounds():void

Calculates the contentBounds value for the axis. Seperating this function from the draw method optimizes processing time, and it allows the plot area to synchronize its axes.

updateScale()method 
public function updateScale(data:Array):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 plot area to synchronize its axes.

Parameters
data:Array — The complete dataset that could be drawn on the axis.
valueToLabel()method 
public 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