API Docs for: 3.5.1
Show:

CategoryAxis Class

Module: charts

CategoryAxis manages category data on an axis.

Methods

_getKeyArray

(
  • key
  • data
)
private

Gets an array of values based on a key.

Parameters:

  • key String

    Value key associated with the data array.

  • data Array

    Array in which the data resides.

Returns:

Array

_setDataByKey

(
  • key
  • data
)
private

Sets data by key

Parameters:

  • key String

    Key value to use.

  • data Array

    Array to use.

_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

    Pattern used to format the value.

Returns:

String

getDataByKey

(
  • value
)

Returns an array of values based on an identifier key.

Parameters:

  • value String

    value used to identify the array

Returns:

Array

getEdgeOffset

(
  • ct
  • l
)

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

Parameters:

  • ct Number

    Number of ticks on the axis.

  • l Number

    Length (in pixels) of the axis.

Returns:

Number

getKeyValueAt

(
  • key
  • index
)

Returns a 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:

String

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

(
  • 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

getMaximumValue

()

Returns a string corresponding to the last label on an axis.

Returns:

String

getMinimumValue

()

Returns a string corresponding to the first label on an axis.

Returns:

String

getTotalMajorUnits

(
  • majorUnit
  • len
)

Returns the total number of majorUnits that will appear on an axis.

Parameters:

  • majorUnit Object

    Object containing properties related to the majorUnit.

  • len Number

    Length of the axis.

Returns:

Number

Properties

_dataType

Unknown private

Type of data used in Axis.

_indices

Unknown private

Object storing key data.

GUID

String private

Constant used to generate unique id.