API Docs for: 3.18.1
Show:

TopAxisLayout Class

Module: axis
Parent Module: charts

Contains algorithms for rendering a top axis.

Constructor

TopAxisLayout

()

Methods

_getDefaultMargins

() private

Default margins for text fields.

Returns:

Object

_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

    The rotation (in degrees) of the label.

Returns:

Array

_setRotationCoords

(
  • props
)
protected

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

Parameters:

  • props Object

    Coordinates, dimension and rotation properties of the label.

drawTick

(
  • path
  • pt
  • tickStyles
)
protected

Draws a tick

Parameters:

  • path Path

    reference to the path Path element in which to draw the tick.

  • pt Object

    hash containing x and y coordinates

  • tickStyles Object

    hash of properties used to draw the tick

getExplicitlySized

() protected

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

Returns:

Boolean

getLabelPoint

(
  • pt
)
protected

Calculates the point for a label.

Parameters:

  • pt Object

    hash containing x and y coordinates

Returns:

Object

getLineStart

() protected

Calculates the coordinates for the first point on an axis.

offsetNodeForTick

(
  • cb
)
protected

Adjusts position for inner ticks.

Parameters:

  • cb Node

    contentBox of the axis

positionLabel

(
  • label
  • pt
)
protected

Rotate and position labels.

Parameters:

  • label HTMLElement

    to rotate position

  • pt Object

    hash containing the x and y coordinates in which the label will be positioned against.

positionTitle

(
  • label
)
protected

Rotate and position title.

Parameters:

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: