mx.charts.chartClasses

# AxisBase - AS3 Flex

Package | mx.charts.chartClasses
Class | public class AxisBase
Inheritance | AxisBase EventDispatcher Object
Subclasses | CategoryAxis, NumericAxis

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The AxisBase class serves as a base class for the various axis types supported in Flex.

MXML Syntax Show MXML Syntax
Hide MXML Syntax

Flex components inherit the following properties from the AxisBase class:

      <mx:tagname
        displayName="No default"
        title="No default"
      >

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | chartDataProvider : Object [write-only] The data provider assigned to the enclosing chart. | AxisBase
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | displayName : String The name of the axis. | AxisBase
|  | title : String The text for the title displayed along the axis. | AxisBase
|  | unitSize : Number [read-only] The size of one unit of data as represented by this axis. | AxisBase

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | AxisBase() Constructor. | AxisBase
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. | EventDispatcher
|  | dataChanged():void Triggers events that inform the range object when the chart data has changed. | AxisBase
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | EventDispatcher
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | registerDataTransform(transform:mx.charts.chartClasses:DataTransform, dimensionName:String):void Each DataTransform that makes use of an axis registers itself with that axis. | AxisBase
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | unregisterDataTransform(transform:mx.charts.chartClasses:DataTransform):void Each DataTransform that makes use of an axis registers itself with that axis. | AxisBase
|  | valueOf():Object Returns the primitive value of the specified object. | Object
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | EventDispatcher

Protected Methods

| Method | Defined By
--- | --- | ---
|  | describeData(requiredFields:uint):Array Called by the governing DataTransform to obtain a description of the data represented by this IChartElement. | AxisBase

Events
Click for more information on events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | activate | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher

Property Detail

### chartDataProvider

property

`chartDataProvider:Object` [write-only]

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The data provider assigned to the enclosing chart. Axis types that are data provider-based can choose to inherit the data provider associated with the enclosing chart. If an axis is shared among multiple charts, the value of this property is `undefined` (most likely it will be the last data provider assigned to one of the associated charts).

Implementation
`public function set chartDataProvider(value:Object):void`

### displayName

property

`displayName:String`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The name of the axis. If set, Flex uses this name to format DataTip controls.

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

### title

property

`title:String`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The text for the title displayed along the axis.

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

### unitSize

property

`unitSize:Number` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The size of one unit of data as represented by this axis. This value is used by various series types to help in rendering. The ColumnSeries class, for example, uses this value to determine how wide columns should be rendered. Different axis types return different values, sometimes dependent on the data being represented. The DateTimeAxis class, for example, might return the number of milliseconds in a day, or a year, depending on the data that is rendered in the chart. Because this value is dependant on collecting the represented data, custom series cannot assume this value is accurate in their `updateData()` or `updateMapping()` methods.

Implementation
`public function get unitSize():Number`
Constructor Detail

### AxisBase

()
Constructor

`public function AxisBase()`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constructor.

Method Detail

### dataChanged

()
method

`public function dataChanged():void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Triggers events that inform the range object when the chart data has changed.

### describeData

()
method

`protected function describeData(requiredFields:uint):Array`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Called by the governing DataTransform to obtain a description of the data represented by this IChartElement. Implementors fill out and return an Array of mx.charts.chartClasses.DataDescription objects to guarantee that their data is correctly accounted for by any axes that are autogenerating values from the displayed data (such as minimum, maximum, interval, and unitSize). Most element types return an Array containing a single DataDescription. Aggregate elements, such as BarSet and ColumnSet, might return multiple DataDescription instances that describe the data displayed by their subelements. When called, the implementor describes the data along the axis indicated by the `dimension` argument. This function might be called for each axis supported by the containing chart.

Parameters

| `requiredFields:uint` — A bitfield that indicates which values of the DataDescription object the particular axis cares about. Implementors can optimize by only calculating the necessary fields.

Returns

| `Array` — An Array of BoundedValue objects containing the DataDescription instances that describe the data that is displayed.

Related API Elements

mx.charts.chartClasses.BoundedValue

### registerDataTransform

()
method

`public function registerDataTransform(transform:mx.charts.chartClasses:DataTransform, dimensionName:String):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Each DataTransform that makes use of an axis registers itself with that axis. The axis is responsible for informing the transform when its relevant values have changed. It should also request values from the transform when it wants to autogenerate minimum and maximum values.

Parameters

| `transform:mx.charts.chartClasses:DataTransform` — The DataTransform to register.
| `dimensionName:String` — The name of the dimension.

### unregisterDataTransform

()
method

`public function unregisterDataTransform(transform:mx.charts.chartClasses:DataTransform):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Each DataTransform that makes use of an axis registers itself with that axis. The axis is responsible for informing the transform when its relevant values have changed. It should also request values from the transform when it wants to autogenerate minimum and maximum values.

Parameters

| `transform:mx.charts.chartClasses:DataTransform` — The DataTransform to unregister.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00