The Axis class. Generates axes for a chart.
_clearLabelCacheRemoves axis labels from the dom and clears the label cache.
_createLabelCacheCreates a cache of labels that can be re-used when the axis redraws.
_dataChangeHandlere
Handles change to the dataProvider
e
Object
Event object
_drawAxisDraws an axis.
_getDefaultStylesGets the default value for the styles attribute. Overrides
base implementation.
_getLabelBoundsValue
Returns the coordinates (top, right, bottom, left) for the bounding box of a label.
Value
String
of the label
_getTextRotationPropsstyles
Generates the properties necessary for rotating and positioning a text field.
styles
Object
properties for the text field
_handleSizeChangee
Updates the axis when the size changes.
e
Object
Event object.
_positionChangeHandlere
Handles change to the position attribute
e
Object
Event object
_removeChildrenRemoves all DOM elements from an HTML element. Used to clear out labels during detruction phase.
_rotatelabel
props
Rotates and positions a text field.
label
HTMLElement
text field to rotate and position
props
Object
properties to be applied to the text field.
_setCanvasCreates a graphic instance to be used for the axis line and ticks.
_setTextlabel
val
Updates the content of text field. This method writes a value into a text field using
appendChild. If the value is a String, it is converted to a TextNode first.
label
HTMLElement
label to be updated
val
String
value with which to update the label
_setTotalTitleSizestyles
Calculates and sets the total size of a title.
styles
Object
Properties for the title field.
_simulateTransformOriginmatrix
rot
transformOrigin
w
h
Simulates a rotation with a specified transformOrigin.
matrix
Matrix
Reference to a Matrix instance.
rot
Number
The rotation (in degrees) that will be performed on a matrix.
transformOrigin
Array
An array represeniting the origin in which to perform the transform. The first index represents the x origin and the second index represents the y origin.
w
Number
The width of the object that will be transformed.
h
Number
The height of the object that will be transformed.
_updateGraphicposition
Updates the the Graphic instance
position
String
Position of axis
_updatePathElementUpdates path.
_updateTitleUpdates the content and style properties for a title field.
destructorDestructor implementation Axis class. Removes all labels and the Graphic instance from the widget.
drawLinestartPoint
endPoint
line
Draws a line segment between 2 points
getFirstPointpt
Gets the position of the first point on an axis.
pt
Object
Object containing x and y coordinates.
getLabelpt
styles
Creates or updates an axis label.
getLastPointCalculates the placement of last tick on an axis.
getLengthCalcuates the width or height of an axis depending on its direction.
getLineEndGets the end point of an axis.
getMaxLabelBoundsReturns the coordinates (top, right, bottom, left) for the bounding box of the last label.
getMinLabelBoundsReturns the coordinates (top, right, bottom, left) for the bounding box of the first label.
getNextPointpoint
majorUnitDistance
Gets the position of the next point on an axis.
getPositionpoint
Calculates position on the axis.
point
Object
contains x and y values
renderUIsyncUImaxLabelSizeLength in pixels of largest text bounding box. Used to calculate the height of the axis.
appendLabelFunctionFunction used to append an axis value to an axis label. This function has the following signature:
HTMLElement)HTMLELement
or a String. This method does not use (HTMLElement | String)HTMLElement using the appendChild method. If the given
value is a String, the method will convert the the value to a textNode before appending to the
HTMLElement. This method will not convert an HTMLString to an HTMLElement.
appendLabelFunctionChange
Fires when the value for the configuration attribute appendLabelFunction is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
appendTitleFunctionFunction used to append a title value to the title object. This function has the following signature:
HTMLElement)HTMLELement
or a String. This method does not use (HTMLElement | String)HTMLElement using the appendChild method. If the given
value is a String, the method will convert the the value to a textNode before appending to the
HTMLElement element. This method will not convert an HTMLString to an HTMLElement.
appendTitleFunctionChange
Fires when the value for the configuration attribute appendTitleFunction is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
bottomTickOffsetDistance determined by the tick styles used to calculate the distance between the axis line in relation to the bottom of the axis.
bottomTickOffsetChange
Fires when the value for the configuration attribute bottomTickOffset is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
calculatedHeightCalculated value of an axis' height. By default, the value is used internally for horizontal axes. If the height attribute is explicitly set, this value will be ignored.
calculatedHeightChange
Fires when the value for the configuration attribute calculatedHeight is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
calculatedWidthCalculated value of an axis' width. By default, the value is used internally for vertical axes. If the width attribute is explicitly set, this value will be ignored.
calculatedWidthChange
Fires when the value for the configuration attribute calculatedWidth is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
edgeOffsetDifference betweend the first/last tick and edge of axis.
edgeOffsetChange
Fires when the value for the configuration attribute edgeOffset is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
graphicThe graphic in which the axis line and ticks will be rendered.
graphicChange
Fires when the value for the configuration attribute graphic is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
heightWhen set, defines the height of a horizontal axis instance. By default, horizontal axes automatically size based on their contents. When the height attribute is set, the axis will not calculate its height. When the height attribute is explicitly set, axis labels will postion themselves off of the the inner edge of the axis and the title, if present, will position itself off of the outer edge. If a specified height is less than the sum of the axis' contents, excess content will overflow.
heightChange
Fires when the value for the configuration attribute height is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
labelFunctionMethod 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 HTMLElement.
String)labelFunctionChange
Fires when the value for the configuration attribute labelFunction is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
labelFunctionScopeObject which should have by the labelFunction
labelFunctionScopeChange
Fires when the value for the configuration attribute labelFunctionScope is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
labelsCollection of labels used to render the axis.
labelsChange
Fires when the value for the configuration attribute labels is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
leftTickOffsetDistance determined by the tick styles used to calculate the distance between the axis line in relation to the left of the axis.
leftTickOffsetChange
Fires when the value for the configuration attribute leftTickOffset is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
maxLabelSizeLength in pixels of largest text bounding box. Used to calculate the height of the axis.
maxLabelSizeChange
Fires when the value for the configuration attribute maxLabelSize is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
nodeContains the contents of the axis.
nodeChange
Fires when the value for the configuration attribute node is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
overlapGraphIndicates whether the axis overlaps the graph. If an axis is the inner most axis on a given position and the tick position is inside or cross, the axis will need to overlap the graph.
overlapGraphChange
Fires when the value for the configuration attribute overlapGraph is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
pathpathChange
Fires when the value for the configuration attribute path is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
positionDirection of the axis.
positionChange
Fires when the value for the configuration attribute position is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
rightTickOffsetDistance determined by the tick styles used to calculate the distance between the axis line in relation to the right side of the axis.
rightTickOffsetChange
Fires when the value for the configuration attribute rightTickOffset is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
stylesStyle properties used for drawing an axis. This attribute is inherited from Renderer. Below are the default values:
inside, outside, cross and none. The
default value is inside.#dad8c9#dad8c9.majorUnit for the axis.
count and distance. If
the determinant is count, the axis ticks will spaced so that a specified number of ticks appear on the axis. If the determinant
is distance, the axis ticks will spaced out according to the specified distance. The default value is count.determinant is count. The default value is 11.determinant is distance. The default value is 75.#808080.Axis, only one of the properties used.
position of bottom. The default value is 4.position of left. The default value is 4.position of top. The default value is 4.position of right. The default value is 4.stylesChange
Fires when the value for the configuration attribute styles is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
tickPathtickPathChange
Fires when the value for the configuration attribute tickPath is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
tickPointsCollection of points used for placement of labels and ticks along the axis.
tickPointsChange
Fires when the value for the configuration attribute tickPoints is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
titleTitle for the axis. When specified, the title will display. The position of the title is determined by the axis position.
titleChange
Fires when the value for the configuration attribute title is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
topTickOffsetDistance determined by the tick styles used to calculate the distance between the axis line in relation to the top of the axis.
topTickOffsetChange
Fires when the value for the configuration attribute topTickOffset is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade
widthWhen set, defines the width of a vertical axis instance. By default, vertical axes automatically size based on their contents. When the width attribute is set, the axis will not calculate its width. When the width attribute is explicitly set, axis labels will postion themselves off of the the inner edge of the axis and the title, if present, will position itself off of the outer edge. If a specified width is less than the sum of the axis' contents, excess content will overflow.
widthChange
Fires when the value for the configuration attribute width is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
e
EventFacade