TimeAxis Class
TimeAxis manages time data on an axis.
Item Index
Attributes
Methods
_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:
_getNumber
-
val
Parses value into a number.
Parameters:
-
val
ObjectValue to parse into a number
Returns:
_setDataByKey
-
key
-
data
Sets data by key
Parameters:
-
key
StringKey value to use.
-
data
ArrayArray to use.
formatLabel
-
value
-
format
Formats a label based on the axis type and optionally specified format.
Parameters:
-
value
Object -
format
ObjectPattern used to format the value.
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:
Properties
_dataType
Unknown
private
Type of data used in Axis
.
GUID
String
private
Constant used to generate unique id.
Attributes
labelFunction
Function
Method used for formatting a label. This attribute allows for the default label formatting method to overridden. The method use would need
to implement the arguments below and return a String
or an HTMLElement
. The default implementation of the method returns a String
. The output of this method
will be rendered to the DOM using appendChild
. If you override the labelFunction
method and return an html string, you will also need to override the Axis'
appendLabelFunction
to accept html as a String
.
- val
- Label to be formatted. (
String
) - format
- STRFTime string used to format the label. (optional)
maximum
Number
The maximum value that will appear on an axis. Unless explicitly set, this value is calculated by the Axis
.