Show:
Module: axis-time-base
Parent Module: charts

TimeImpl contains logic for time data. TimeImpl is used by the following classes: <ul> <li>TimeAxisBase</li> <li>TimeAxis</li> </ul>

Constructor

TimeImpl

()

Methods

_getCoordFromValue

(
  • min
  • max
  • length
  • dataValue
  • offset
  • reverse
)
private

Returns a coordinate corresponding to a data values.

Parameters:

  • min Number

    <p><p>The minimum for the axis.</p></p>

  • max Number

    <p><p>The maximum for the axis.</p></p>

  • length Number

    <p><p>The distance that the axis spans.</p></p>

  • dataValue Number

    <p><p>A value used to ascertain the coordinate.</p></p>

  • offset Number

    <p><p>Value in which to offset the coordinates.</p></p>

  • reverse Boolean

    <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
)
private

Gets an array of values based on a key.

Parameters:

  • key String

    <p><p>Value key associated with the data array.</p></p>

  • data Array

    <p><p>Array in which the data resides.</p></p>

Returns:

<p><p>Array</p></p>

_getNumber

(
  • val
)
private

Parses value into a number.

Parameters:

  • val Object

    <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
)
private

Setter method for maximum attribute.

Parameters:

  • value Object

_minimumGetter

() private

Getter method for minimum attribute.

Returns:

<p><p>Number</p></p>

_minimumSetter

(
  • value
)
private

Setter method for minimum attribute.

Parameters:

  • value Object

_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:

  • value Object
  • format Object

    <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

labelFormat

String

Pattern used by the labelFunction to format a label.

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>