Package | com.yahoo.astra.fl.charts |
Class | public class Axis |
Inheritance | Axis ![]() |
Implements | IAxis |
Subclasses | CategoryAxis, NumericAxis, TimeAxis |
Axis
object
shouldn't be instantiated directly. Instead, a subclass with a concrete
implementation should be used.
Property | Defined by | ||
---|---|---|---|
contentBounds : Rectangle [read-only]
Represents the area where content should be drawn within the axis.
| Axis | ||
labelFunction : Function
A function may be set to determine the text value of the labels.
| Axis | ||
orientation : String
Determines if the axis is displayed vertically or horizontally.
| Axis | ||
overflowEnabled : Boolean
Determines if items such as labels and other visual objects affect the
contentBounds property of the axis. | Axis | ||
plotArea : IPlotArea
The plot area to which this axis is associated.
| Axis | ||
reverse : Boolean
Sets the direction of the labels and other visual objects along the axis.
| Axis | ||
title : String
The text that will appear next to the axis to indicate information
about the data that it displays.
| Axis |
Method | Defined by | ||
---|---|---|---|
Constructor.
| Axis | ||
localToValue(position:Number):Object
Calculates the value of a data point along the axis based on a position.
| Axis | ||
updateBounds():void
Calculates the
contentBounds value for the axis. | Axis | ||
updateScale(data:Array):void
Determines the axis scale based on the input data set.
| Axis | ||
valueToLabel(value:Object):String
Converts a value on the axis to formatted label text.
| Axis | ||
valueToLocal(value:Object):Number
Calculates the position of a data point along the axis.
| Axis |
Method | Defined by | ||
---|---|---|---|
calculateContentBounds():void
Determines the rectangular bounds where data may be drawn within this axis.
| Axis |
contentBounds | property |
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.
public function get contentBounds():Rectangle
labelFunction | property |
labelFunction:Function
[read-write]A function may be set to determine the text value of the labels.
function labelFunction(value:Number):StringImplementation
public function get labelFunction():Function
public function set labelFunction(value:Function):void
orientation | property |
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
overflowEnabled | property |
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.
public function get overflowEnabled():Boolean
public function set overflowEnabled(value:Boolean):void
plotArea | property |
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
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.
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
Axis | () | constructor |
calculateContentBounds | () | method |
protected function calculateContentBounds():void
Determines the rectangular bounds where data may be drawn within this axis.
localToValue | () | method |
public function localToValue(position:Number):Object
Calculates the value of a data point along the axis based on a position.
Parametersposition:Number — The position in pixels used to determine the value
|
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.
Parametersdata: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.
Parametersvalue:Object — the value of the item for which a label is needed
|
String — the formatted label text
|
valueToLocal | () | method |
public function valueToLocal(value:Object):Number
Calculates the position of a data point along the axis.
Parametersvalue:Object — The data used to determine the position
|
Number — The display position in pixels on the axis
|