Show:
Module: axis
Parent Module: charts

Contains algorithms for rendering a bottom axis.

Constructor

BottomAxisLayout

()

Methods

_getDefaultMargins

() private

Default margins for text fields.

Returns:

<p>Object</p>

_getTransformOrigin

(
  • rot
)
protected

Returns the transformOrigin to use for an axis label based on the position of the axis and the rotation of the label.

Parameters:

  • rot Number

    <p>The rotation (in degrees) of the label.</p>

Returns:

<p>Array</p>

_setRotationCoords

(
  • props
)
protected

Adjusts the coordinates of an axis label based on the rotation.

Parameters:

  • props Object

    <p>Coordinates, dimension and rotation properties of the label.</p>

drawTick

(
  • path
  • pt
  • tickStyles
)
protected

Draws a tick

Parameters:

  • path Path

    <p>reference to the path <code>Path</code> element in which to draw the tick.</p>

  • pt Object

    <p>hash containing x and y coordinates</p>

  • tickStyles Object

    <p>hash of properties used to draw the tick</p>

getExplicitlySized

() protected

Determines the available label height when the axis width has been explicitly set.

Returns:

<p>Boolean</p>

getLabelPoint

(
  • pt
)
protected

Calculates the point for a label.

Parameters:

  • pt Object

    <p>Object containing x and y coordinates</p>

Returns:

<p>Object</p>

getLineStart

() protected

Calculates the coordinates for the first point on an axis.

offsetNodeForTick

(
  • cb
)
protected

Adjusts position for inner ticks.

Parameters:

  • cb Node

    <p>contentBox of the axis</p>

positionLabel

(
  • label
  • pt
)
protected

Rotate and position labels.

Parameters:

  • label HTMLElement

    <p>to rotate position</p>

  • pt Object

    <p>hash containing the x and y coordinates in which the label will be positioned against.</p>

positionTitle

(
  • label
)
protected

Rotate and position title.

Parameters:

  • label HTMLElement

    <p>to rotate position</p>

setCalculatedSize

() protected

Assigns a height based on the size of the contents.

setTickOffsets

() protected

Sets the length of the tick on either side of the axis line.

updateMaxLabelSize

(
  • label
)
protected

Updates the value for the maxLabelSize for use in calculating total size.

Parameters:

  • label HTMLElement

    <p>to measure</p>