YUI AS Component Documentation | All Packages | All Classes | Index | Frames No Frames |
Interface IAxis

Package | com.yahoo.astra.fl.charts.axes
Interface | public interface IAxis extends flash.events.IEventDispatcher
Subinterfaces | ICartesianAxisRenderer, IClusteringAxis, IOriginAxis, IRadialAxisRenderer, IStackingAxis
Implementors | CategoryAxis, NumericAxis, TimeAxis

Data-only representation of a chart's axis.

Public Properties

| Property | Defined by
--- | --- | ---
|  | chart : IChart The chart in which this axis appears. | IAxis
|  | dataProvider : Array Data used in determining the axis scale | IAxis
|  | height : Number Total height of axis | IAxis
|  | labelData : AxisLabelData Maximum dimensions of axis labels | IAxis
|  | labelFunction : Function A function may be set to determine the text value of the labels. | IAxis
|  | labelSpacing : Number The space, in pixels, between labels on an axis. | IAxis
|  | maxLabel : String Largest label value to appear on the axis. | IAxis
|  | maxLabelHeight : Number Gets or sets the maximum width of a label | IAxis
|  | maxLabelWidth : Number Gets or sets the maximum width of a label | IAxis
|  | position : String Position of axis in relation to the chart | IAxis
|  | renderer : IAxisRenderer The visual renderer associated with this axis. | 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
|  | width : Number Total width of axis | IAxis

Public Methods

| Method | Defined by
--- | --- | ---
|  | getMaxLabel():String Returns the maximum string length of a label on the axis. | IAxis
|  | updateScale():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

Property detail

chart | property

`chart:IChart` [read-write]

The chart in which this axis appears.

Implementation
`public function get chart():IChart`
`public function set chart(value:IChart):void`

dataProvider | property |

`dataProvider:Array` [read-write]

Data used in determining the axis scale

Implementation
`public function get dataProvider():Array`
`public function set dataProvider(value:Array):void`

height | property |

`height:Number` [read-write]

Total height of axis

Implementation
`public function get height():Number`
`public function set height(value:Number):void`

labelData | property |

`labelData:AxisLabelData` [read-write]

Maximum dimensions of axis labels

Implementation
`public function get labelData():AxisLabelData`
`public function set labelData(value:AxisLabelData):void`

labelFunction | property |

`labelFunction:Function` [read-write]

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

    function labelFunction(value:Object):String

Implementation
`public function get labelFunction():Function`
`public function set labelFunction(value:Function):void`

labelSpacing | property |

`labelSpacing:Number` [read-write]

The space, in pixels, between labels on an axis.

Implementation
`public function get labelSpacing():Number`
`public function set labelSpacing(value:Number):void`

maxLabel | property |

`maxLabel:String` [read-write]

Largest label value to appear on the axis.

Implementation
`public function get maxLabel():String`
`public function set maxLabel(value:String):void`

maxLabelHeight | property |

`maxLabelHeight:Number` [read-write]

Gets or sets the maximum width of a label

Implementation
`public function get maxLabelHeight():Number`
`public function set maxLabelHeight(value:Number):void`

maxLabelWidth | property |

`maxLabelWidth:Number` [read-write]

Gets or sets the maximum width of a label

Implementation
`public function get maxLabelWidth():Number`
`public function set maxLabelWidth(value:Number):void`

position | property |

`position:String` [read-write]

Position of axis in relation to the chart

Implementation
`public function get position():String`
`public function set position(value:String):void`

renderer | property |

`renderer:IAxisRenderer` [read-write]

The visual renderer associated with this axis.

Implementation
`public function get renderer():IAxisRenderer`
`public function set renderer(value:IAxisRenderer):void`

reverse | property |

`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`

title | property |

`title:String` [read-write]

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

Implementation
`public function get title():String`
`public function set title(value:String):void`

width | property |

`width:Number` [read-write]

Total width of axis

Implementation
`public function get width():Number`
`public function set width(value:Number):void`
Method detail

getMaxLabel | () | method

`public function getMaxLabel():String`

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

Returns

| `String` — the formatted label

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 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