Yahoo! UI Library

charts  3.3.0

Yahoo! UI Library > charts > AxisType
Search:
 
Filters

Class AxisType - extends Axis

Known Subclasses:
CategoryAxis TimeAxis NumericAxis
AxisType is an abstract class that manages the data for an axis.

Constructor

AxisType ( config )
Parameters:
config <Object> (optional) Configuration parameters for the Chart.

Properties

_data - private object


_dataMaximum - private object


_dataReady - private object


_setMaximum - private object


_setMinimum - private object


_type - private object


_updateTotalDataFlag - private object


GUID - private object


Properties inherited from Renderer:

Methods

_dataProviderChangeHandler

private void _dataProviderChangeHandler ( )

_getKeyArray

private void _getKeyArray ( )

_keyChangeHandler

private void _keyChangeHandler ( )

_setDataByKey

private void _setDataByKey ( )

_updateMinAndMax

private void _updateMinAndMax ( )

_updateTotalData

private void _updateTotalData ( )

addKey

void addKey ( value )
Adds an array to the key hash.
Parameters:
value <object> Indicates what key to use in retrieving the array.

bindUI

private void bindUI ( )

getDataByKey

getDataByKey ( value )
Returns an array of values based on an identifier key.
Parameters:
value <String> value used to identify the array
Returns:
Object

getKeyValueAt

getKeyValueAt ( key , index )
Returns a numeric value based of a key value and an index.
Parameters:
key <String> value used to look up the correct array
index <Number> within the array
Returns:
Object

getLabelByIndex

getLabelByIndex ( i , l )
Calculates and returns a value based on the number of labels and the index of the current label.
Parameters:
i <Number> Index of the label.
l <Number> Total number of labels.
Returns:
String

getMajorUnitDistance

getMajorUnitDistance ( len , uiLen , majorUnit )
Returns the distance between major units on an axis.
Parameters:
len <Number> Number of ticks
uiLen <Number> Size of the axis.
majorUnit <Object> Hash of properties used to determine the majorUnit
Returns:
Number

getTotalMajorUnits

getTotalMajorUnits ( )
Returns the total number of majorUnits that will appear on an axis.
Returns:
Number

removeKey

void removeKey ( value )
Removes an array from the key hash.
Parameters:
value <String> Indicates what key to use in removing from the hash.

Events

dataChange

dataChange ( event )
Fires when the value for the configuration attribute 'data' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

dataMaximumChange

dataMaximumChange ( event )
Fires when the value for the configuration attribute 'dataMaximum' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

dataMinimumChange

dataMinimumChange ( event )
Fires when the value for the configuration attribute 'dataMinimum' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

dataProviderChange

dataProviderChange ( event )
Fires when the value for the configuration attribute 'dataProvider' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

getEdgeOffsetChange

getEdgeOffsetChange ( event )
Fires when the value for the configuration attribute 'getEdgeOffset' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

keyCollectionChange

keyCollectionChange ( event )
Fires when the value for the configuration attribute 'keyCollection' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

keysChange

keysChange ( event )
Fires when the value for the configuration attribute 'keys' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

labelFunctionChange

labelFunctionChange ( event )
Fires when the value for the configuration attribute 'labelFunction' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

maximumChange

maximumChange ( event )
Fires when the value for the configuration attribute 'maximum' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

minimumChange

minimumChange ( event )
Fires when the value for the configuration attribute 'minimum' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

roundingMethodChange

roundingMethodChange ( event )
Fires when the value for the configuration attribute 'roundingMethod' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

setMaxChange

setMaxChange ( event )
Fires when the value for the configuration attribute 'setMax' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

setMinChange

setMinChange ( event )
Fires when the value for the configuration attribute 'setMin' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

typeChange

typeChange ( event )
Fires when the value for the configuration attribute 'type' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

data - Array

Array of axis data

dataMaximum - Number

The maximum value contained in the data array. Used for maximum when autoMax is true.

dataMinimum - Number

The minimum value contained in the data array. Used for minimum when autoMin is true.

dataProvider - Array

Instance of ChartDataProvider that the class uses to build its own data.

getEdgeOffset - Method

Gets the distance that the first and last ticks are offset from there respective edges.

keyCollection - Array

Array containing all the keys in the axis.

keys - Object

Hash of array identifed by a string value.

labelFunction - Function

Method used for formatting a label.

maximum - Number

The maximum value that will appear on an axis.

minimum - Number

The minimum value that will appear on an axis.

roundingMethod - String

Indicates how to round unit values.
niceNumber
Units will be smoothed based on the number of ticks and data range.
auto
If the range is greater than 1, the units will be rounded.
numeric value
Units will be equal to the numeric value.
null
No rounding will occur.
Default Value: niceNumber

setMax - Boolean

Determines whether the maximum is calculated or explicitly set by the user.

setMin - Boolean

Determines whether the minimum is calculated or explicitly set by the user.

type - String

Returns the type of axis data
time
Manages time data
stacked
Manages stacked numeric data
numeric
Manages numeric data
category
Manages categorical data


Copyright © 2011 Yahoo! Inc. All rights reserved.