TimeImpl Class
TimeImpl contains logic for time data. TimeImpl is used by the following classes: <ul> <li>TimeAxisBase</li> <li>TimeAxis</li> </ul>
Constructor
TimeImpl
()
Index
Methods
Attributes
Methods
_getCoordFromValue
-
min -
max -
length -
dataValue -
offset -
reverse
Returns a coordinate corresponding to a data values.
Parameters:
-
minNumber<p><p>The minimum for the axis.</p></p>
-
maxNumber<p><p>The maximum for the axis.</p></p>
-
lengthNumber<p><p>The distance that the axis spans.</p></p>
-
dataValueNumber<p><p>A value used to ascertain the coordinate.</p></p>
-
offsetNumber<p><p>Value in which to offset the coordinates.</p></p>
-
reverseBoolean<p><p>Indicates whether the coordinates should start from the end of an axis. Only used in the numeric implementation.</p></p>
Returns:
<p><p>Number</p></p>
_getKeyArray
-
key -
data
Gets an array of values based on a key.
Parameters:
-
keyString<p><p>Value key associated with the data array.</p></p>
-
dataArray<p><p>Array in which the data resides.</p></p>
Returns:
<p><p>Array</p></p>
_getNumber
-
val
Parses value into a number.
Parameters:
-
valObject<p><p>Value to parse into a number</p></p>
Returns:
<p><p>Number</p></p>
_getSetMax
()
private
Indicates whether or not the maximum attribute has been explicitly set.
Returns:
<p><p>Boolean</p></p>
_getSetMin
()
private
Indicates whether or not the minimum attribute has been explicitly set.
Returns:
<p><p>Boolean</p></p>
_maximumGetter
()
private
Getter method for maximum attribute.
Returns:
<p><p>Number</p></p>
_maximumSetter
-
value
Setter method for maximum attribute.
Parameters:
-
valueObject
_minimumGetter
()
private
Getter method for minimum attribute.
Returns:
<p><p>Number</p></p>
_minimumSetter
-
value
Setter method for minimum attribute.
Parameters:
-
valueObject
_updateMinAndMax
()
private
Calculates the maximum and minimum values for the Axis.
formatLabel
-
value -
format
Formats a label based on the axis type and optionally specified format.
Parameters:
-
valueObject -
formatObject<p><p>Pattern used to format the value.</p></p>
Returns:
<p><p>String</p></p>
Properties
_dataType
Unknown
private
Type of data used in Axis.
_type
Unknown
private
Type of data used in Data.
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.
<dl>
<dt>val</dt><dd>Label to be formatted. (String)</dd>
<dt>format</dt><dd>STRFTime string used to format the label. (optional)</dd>
</dl>