AxisType Class
AxisType is an abstract class that manages the data for an axis.
Item Index
Methods
Methods
_dataProviderChangeHandler
-
e
Handles changes to dataProvider
.
Parameters:
-
e
ObjectEvent object.
_getKeyArray
-
key
-
data
Gets an array of values based on a key.
Parameters:
-
key
StringValue key associated with the data array.
-
data
ArrayArray in which the data resides.
Returns:
_hasDataOverflow
()
protected
Checks to see if data extends beyond the range of the axis. If so, that data will need to be hidden. This method is internal, temporary and subject to removal in the future.
Returns:
_keyChangeHandler
-
e
Updates the Axis
after a change in keys.
Parameters:
-
e
ObjectEvent object.
_setDataByKey
-
key
-
data
Sets data by key
Parameters:
-
key
StringKey value to use.
-
data
ArrayArray to use.
_updateMinAndMax
()
private
Calculates the maximum and minimum values for the Axis
.
_updateTotalData
()
private
Updates the total data array.
addKey
-
value
Adds an array to the key hash.
Parameters:
-
value
ObjectIndicates what key to use in retrieving the array.
bindUI
()
private
getDataByKey
-
value
Returns an array of values based on an identifier key.
Parameters:
-
value
Stringvalue used to identify the array
Returns:
getEdgeOffset
-
ct
-
l
Gets the distance that the first and last ticks are offset from there respective edges.
Parameters:
-
ct
NumberNumber of ticks on the axis.
-
l
NumberLength (in pixels) of the axis.
Returns:
getKeyValueAt
-
key
-
index
Returns a value based of a key value and an index.
Parameters:
-
key
Stringvalue used to look up the correct array
-
index
Numberwithin the array
Returns:
getLabelByIndex
-
i
-
l
Calculates and returns a value based on the number of labels and the index of the current label.
Parameters:
-
i
NumberIndex of the label.
-
l
NumberTotal number of labels.
Returns:
getMajorUnitDistance
-
len
-
uiLen
-
majorUnit
Returns the distance between major units on an axis.
Parameters:
-
len
NumberNumber of ticks
-
uiLen
NumberSize of the axis.
-
majorUnit
ObjectHash of properties used to determine the majorUnit
Returns:
getMaximumValue
()
Returns a string corresponding to the last label on an axis.
Returns:
getMinimumValue
()
Returns a string corresponding to the first label on an axis.
Returns:
getTotalMajorUnits
()
Returns the total number of majorUnits that will appear on an axis.
Returns:
initializer
()
private
removeKey
-
value
Removes an array from the key hash.
Parameters:
-
value
StringIndicates what key to use in removing from the hash.
Properties
_data
Array
private
Reference to data array.
_dataMaximum
Object
private
Storage for dataMaximum
attribute.
_dataReady
Boolean
private
Storage for dataReady
attribute.
_setMaximum
Object
private
Storage for setMaximum
attribute.
_setMinimum
Object
private
Storage for setMinimum
attribute.
_type
String
private
Type of data used in Axis
.
_updateTotalDataFlag
Boolean
private
Indicates whether the all data is up to date.
GUID
String
private
Constant used to generate unique id.
Attributes
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.
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: niceNumber