TopAxisLayout Class
Contains algorithms for rendering a top axis.
Constructor
TopAxisLayout
()
Index
Methods
_getDefaultMargins
()
private
Default margins for text fields.
Returns:
<p><p><p><p><p>Object</p></p></p></p></p>
_getTransformOrigin
-
rot
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><p><p><p><p>The rotation (in degrees) of the label.</p></p></p></p></p>
Returns:
<p><p><p><p><p>Array</p></p></p></p></p>
_setRotationCoords
-
props
Adjusts the coordinates of an axis label based on the rotation.
Parameters:
-
props
Object<p><p><p><p><p>Coordinates, dimension and rotation properties of the label.</p></p></p></p></p>
drawTick
-
path
-
pt
-
tickStyles
Draws a tick
Parameters:
-
path
Path<p><p><p><p><p>reference to the path <code>Path</code> element in which to draw the tick.</p></p></p></p></p>
-
pt
Object<p><p><p><p><p>hash containing x and y coordinates</p></p></p></p></p>
-
tickStyles
Object<p><p><p><p><p>hash of properties used to draw the tick</p></p></p></p></p>
getExplicitlySized
()
protected
Determines the available label height when the axis width has been explicitly set.
Returns:
<p><p><p><p><p>Boolean</p></p></p></p></p>
getLabelPoint
-
pt
Calculates the point for a label.
Parameters:
-
pt
Object<p><p><p><p><p>hash containing x and y coordinates</p></p></p></p></p>
Returns:
<p><p><p><p><p>Object</p></p></p></p></p>
getLineStart
()
protected
Calculates the coordinates for the first point on an axis.
offsetNodeForTick
-
cb
Adjusts position for inner ticks.
Parameters:
-
cb
Node<p><p><p><p><p>contentBox of the axis</p></p></p></p></p>
positionLabel
-
label
-
pt
Rotate and position labels.
Parameters:
-
label
HTMLElement<p><p><p><p><p>to rotate position</p></p></p></p></p>
-
pt
Object<p><p><p><p><p>hash containing the x and y coordinates in which the label will be positioned against.</p></p></p></p></p>
positionTitle
-
label
Rotate and position title.
Parameters:
-
label
HTMLElement<p><p><p><p><p>to rotate position</p></p></p></p></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
Updates the value for the maxLabelSize
for use in calculating total size.
Parameters:
-
label
HTMLElement<p><p><p><p><p>to measure</p></p></p></p></p>